Handler function for GET requests from Figshare

get_figshare(
  file_name = NA,
  item = "19700056",
  output_dir = tempdir(),
  return_list = FALSE
)

Arguments

file_name

Which item are we downloading?

item

What is the item we are retrieving?

output_dir

Where should the file be saved?

return_list

Should the list of files be returned instead of the file

Value

Downloads necessary annotation files from Figshare and reads them in as data frames.

Examples

# \donttest{

get_figshare(
  return_list = TRUE,
  output_dir = tempdir()
)
#> 
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
#>          id                                                   name       size
#> 1  34989865                        Achilles_cell_line_efficacy.csv      28656
#> 2  35020903                                        sample_info.csv     461812
#> 3  34989868                     Achilles_cell_line_growth_rate.csv      28566
#> 4  34989871                         Achilles_common_essentials.csv      25883
#> 5  34989874                            Achilles_dropped_guides.csv     188556
#> 6  34989877                            Achilles_guide_efficacy.csv    2832269
#> 7  34989880                                 Achilles_guide_map.csv    4012794
#> 8  34989883                       Achilles_high_variance_genes.csv       7227
#> 9  34989886                           Achilles_gene_dependency.csv  345057026
#> 10 34989889                               Achilles_gene_effect.csv  352646659
#> 11 34989892                   Achilles_gene_effect_uncorrected.csv  358061824
#> 12 34989895                   Achilles_logfold_change_failures.csv  251017335
#> 13 34989901                                  Achilles_metadata.csv      65036
#> 14 34989904                            Achilles_raw_readcounts.csv  890882590
#> 15 34989910                   Achilles_raw_readcounts_failures.csv   76580967
#> 16 34989913                             Achilles_replicate_map.csv     103773
#> 17 34989916               Achilles_replicate_QC_report_failing.csv     290973
#> 18 34989919                                    CCLE_expression.csv  428612351
#> 19 34989922                               CCLE_expression_full.csv  857722211
#> 20 34989928 CCLE_expression_proteincoding_genes_expected_count.csv  159831957
#> 21 34989931                                       CCLE_fusions.csv   10147141
#> 22 34989934                            CCLE_fusions_unfiltered.csv   85101250
#> 23 34989937                                       CCLE_gene_cn.csv  840532069
#> 24 34989940                                     CCLE_mutations.csv  258051137
#> 25 34989943                       CCLE_mutations_bool_damaging.csv   61683448
#> 26 34989946                        CCLE_mutations_bool_hotspot.csv   28623366
#> 27 34989949                  CCLE_mutations_bool_nonconserving.csv   66448750
#> 28 34989952                CCLE_mutations_bool_otherconserving.csv     137389
#> 29 34989955                            Achilles_logfold_change.csv 2904244602
#> 30 34989958                                  CCLE_RNAseq_reads.csv  372776568
#> 31 34989970                                    CCLE_segment_cn.csv   36741691
#> 32 34989985         CCLE_expression_transcripts_expected_count.csv 1559945467
#> 33 34990018                                   CCLE_wes_gene_cn.csv 1819922377
#> 34 34990021                                CCLE_wes_segment_cn.csv   16841624
#> 35 34990024                                  common_essentials.csv      17020
#> 36 34990027                           CRISPR_common_essentials.csv      26240
#> 37 34990030                             CRISPR_dataset_sources.csv      20595
#> 38 34990033                             CRISPR_gene_dependency.csv  376767460
#> 39 34990036                                 CRISPR_gene_effect.csv  387091918
#> 40 34990048                            CCLE_RNAseq_transcripts.csv 3513461590
#> 41 34990051                                      nonessentials.csv      11492
#> 42 34990054                                             README.txt      21109
#>    is_link_only                                    download_url
#> 1         FALSE https://ndownloader.figshare.com/files/34989865
#> 2         FALSE https://ndownloader.figshare.com/files/35020903
#> 3         FALSE https://ndownloader.figshare.com/files/34989868
#> 4         FALSE https://ndownloader.figshare.com/files/34989871
#> 5         FALSE https://ndownloader.figshare.com/files/34989874
#> 6         FALSE https://ndownloader.figshare.com/files/34989877
#> 7         FALSE https://ndownloader.figshare.com/files/34989880
#> 8         FALSE https://ndownloader.figshare.com/files/34989883
#> 9         FALSE https://ndownloader.figshare.com/files/34989886
#> 10        FALSE https://ndownloader.figshare.com/files/34989889
#> 11        FALSE https://ndownloader.figshare.com/files/34989892
#> 12        FALSE https://ndownloader.figshare.com/files/34989895
#> 13        FALSE https://ndownloader.figshare.com/files/34989901
#> 14        FALSE https://ndownloader.figshare.com/files/34989904
#> 15        FALSE https://ndownloader.figshare.com/files/34989910
#> 16        FALSE https://ndownloader.figshare.com/files/34989913
#> 17        FALSE https://ndownloader.figshare.com/files/34989916
#> 18        FALSE https://ndownloader.figshare.com/files/34989919
#> 19        FALSE https://ndownloader.figshare.com/files/34989922
#> 20        FALSE https://ndownloader.figshare.com/files/34989928
#> 21        FALSE https://ndownloader.figshare.com/files/34989931
#> 22        FALSE https://ndownloader.figshare.com/files/34989934
#> 23        FALSE https://ndownloader.figshare.com/files/34989937
#> 24        FALSE https://ndownloader.figshare.com/files/34989940
#> 25        FALSE https://ndownloader.figshare.com/files/34989943
#> 26        FALSE https://ndownloader.figshare.com/files/34989946
#> 27        FALSE https://ndownloader.figshare.com/files/34989949
#> 28        FALSE https://ndownloader.figshare.com/files/34989952
#> 29        FALSE https://ndownloader.figshare.com/files/34989955
#> 30        FALSE https://ndownloader.figshare.com/files/34989958
#> 31        FALSE https://ndownloader.figshare.com/files/34989970
#> 32        FALSE https://ndownloader.figshare.com/files/34989985
#> 33        FALSE https://ndownloader.figshare.com/files/34990018
#> 34        FALSE https://ndownloader.figshare.com/files/34990021
#> 35        FALSE https://ndownloader.figshare.com/files/34990024
#> 36        FALSE https://ndownloader.figshare.com/files/34990027
#> 37        FALSE https://ndownloader.figshare.com/files/34990030
#> 38        FALSE https://ndownloader.figshare.com/files/34990033
#> 39        FALSE https://ndownloader.figshare.com/files/34990036
#> 40        FALSE https://ndownloader.figshare.com/files/34990048
#> 41        FALSE https://ndownloader.figshare.com/files/34990051
#> 42        FALSE https://ndownloader.figshare.com/files/34990054
#>                        supplied_md5                     computed_md5   mimetype
#> 1  501d15c0cce78153c7dfe5241990e45d 501d15c0cce78153c7dfe5241990e45d text/plain
#> 2  0a485aebbbea895cd150e3d8b622c167 0a485aebbbea895cd150e3d8b622c167 text/plain
#> 3  2237e794639c92f946383c70ca6caee0 2237e794639c92f946383c70ca6caee0 text/plain
#> 4  ec90d2baa0ebafde3abbeb69e809745e ec90d2baa0ebafde3abbeb69e809745e text/plain
#> 5  6085a9b2eba6998a53c284cf30d8f0e7 6085a9b2eba6998a53c284cf30d8f0e7 text/plain
#> 6  14767807325cbae5d80759a5df53c2d7 14767807325cbae5d80759a5df53c2d7 text/plain
#> 7  fc53a2613ef29733a98369cc5a6bbdb6 fc53a2613ef29733a98369cc5a6bbdb6 text/plain
#> 8  82f331bcc83d8c08b926e3dec08b3edb 82f331bcc83d8c08b926e3dec08b3edb text/plain
#> 9  015e0b62a0c4f82c54679aa722dce5db 015e0b62a0c4f82c54679aa722dce5db text/plain
#> 10 4843a0c78ef50ae52ea560222c73730d 4843a0c78ef50ae52ea560222c73730d text/plain
#> 11 f7a883f2191bb0be298cfd69715360cc f7a883f2191bb0be298cfd69715360cc text/plain
#> 12 b24f81293263a51690b4bcc6d614ac0d b24f81293263a51690b4bcc6d614ac0d text/plain
#> 13 90b91c5c39b5c1b287241b408aacd7e7 90b91c5c39b5c1b287241b408aacd7e7 text/plain
#> 14 d823f5f60d668655949b162ea0f9ff46 d823f5f60d668655949b162ea0f9ff46 text/plain
#> 15 48386fddc74262bef1abdfde346e55ee 48386fddc74262bef1abdfde346e55ee text/plain
#> 16 fa937079bb8ffca6c1eecd9361fe598f fa937079bb8ffca6c1eecd9361fe598f text/plain
#> 17 ac19304213b5ad0c33fedccabf4832a4 ac19304213b5ad0c33fedccabf4832a4 text/plain
#> 18 0b8a120a368ff69a80368629afee39fb 0b8a120a368ff69a80368629afee39fb text/plain
#> 19 aadbbf68c587db63eba025b8bf7a792a aadbbf68c587db63eba025b8bf7a792a text/plain
#> 20 5d06e6d6a609a0848eec74fd1fc9390d 5d06e6d6a609a0848eec74fd1fc9390d text/plain
#> 21 dd72eaee86c1720b4e084f6beaa9c68e dd72eaee86c1720b4e084f6beaa9c68e text/plain
#> 22 0178394ecd0822d1c133179b452492f4 0178394ecd0822d1c133179b452492f4 text/plain
#> 23 d4f8801b0b20483dfae7cab2b6919c83 d4f8801b0b20483dfae7cab2b6919c83 text/plain
#> 24 37273356f1adb580f2d5442300baaa0c 37273356f1adb580f2d5442300baaa0c text/plain
#> 25 4bb3f75f798cfa867c34f9abd4553490 4bb3f75f798cfa867c34f9abd4553490 text/plain
#> 26 e88e3eacbd9fb529a3679f43cf237423 e88e3eacbd9fb529a3679f43cf237423 text/plain
#> 27 20edb88840c3b2c4376631acd5d40416 20edb88840c3b2c4376631acd5d40416 text/plain
#> 28 e326d68750a3e2056a2a2bd472cd59d2 e326d68750a3e2056a2a2bd472cd59d2 text/plain
#> 29 37944384492d215e0450c61fe8d5a8d4 37944384492d215e0450c61fe8d5a8d4 text/plain
#> 30 2cd0cad38a6d9ab153e86bbfa5a9b101 2cd0cad38a6d9ab153e86bbfa5a9b101 text/plain
#> 31 ef9d8edcf0abfd38bd7789890693b92e ef9d8edcf0abfd38bd7789890693b92e text/plain
#> 32 903b8ce40dd7ed1cf4be79d21b265a3b 903b8ce40dd7ed1cf4be79d21b265a3b text/plain
#> 33 cc45e95147377c4db18032a4335757f9 cc45e95147377c4db18032a4335757f9 text/plain
#> 34 9760849a1142cba07a57343d7c14c2fe 9760849a1142cba07a57343d7c14c2fe text/plain
#> 35 39ab8260b3a36bdea44419aa4ad1c1db 39ab8260b3a36bdea44419aa4ad1c1db text/plain
#> 36 bf4ee18846231c93554c9671cca5a007 bf4ee18846231c93554c9671cca5a007 text/plain
#> 37 203785b9f436766664a9cda7ded0c3ac 203785b9f436766664a9cda7ded0c3ac text/plain
#> 38 757ffb0c2ed3f59065c42783e8766030 757ffb0c2ed3f59065c42783e8766030 text/plain
#> 39 729a33b49291aca69409210c8447a838 729a33b49291aca69409210c8447a838 text/plain
#> 40 27c3a830bb788920b6139ce089618999 27c3a830bb788920b6139ce089618999 text/plain
#> 41 402f2f70dde770bbeaf63faf00de4b5f 402f2f70dde770bbeaf63faf00de4b5f text/plain
#> 42 d415bd268980832d115553eac967be86 d415bd268980832d115553eac967be86 text/plain

get_figshare(
  file_name = "Achilles_common_essentials.csv",
  output_dir = tempdir()
)
#> 
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
Downloading: 3.4 kB     
#> Downloading: Achilles_common_essentials.csv
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
#> [1] "/var/folders/2d/d8927cd105550jjcy7qy99_w0000gn/T//RtmpboDQTA/Achilles_common_essentials.csv"
# }