adigherman / Rxnat

retrieve neuro images from various public/private datasets
5 stars 4 forks source link

HCP fail #6

Closed muschellij2 closed 4 years ago

muschellij2 commented 4 years ago
    install_cran_pkg = function(package) {
      if (!requireNamespace(package, quietly = TRUE)) {
        install.packages(package)
      } else {
        require(package, character.only = TRUE)
      }
    }
    install_cran_pkg("dplyr")
    #> Loading required package: dplyr
    #> 
    #> Attaching package: 'dplyr'
    #> The following objects are masked from 'package:stats':
    #> 
    #>     filter, lag
    #> The following objects are masked from 'package:base':
    #> 
    #>     intersect, setdiff, setequal, union
    install_cran_pkg("fslr")
    #> Loading required package: fslr
    #> Loading required package: oro.nifti
    #> oro.nifti 0.11.0
    #> 
    #> Attaching package: 'oro.nifti'
    #> The following object is masked from 'package:dplyr':
    #> 
    #>     slice
    #> Loading required package: neurobase
    install_cran_pkg("scales")
    #> Loading required package: scales
    install_cran_pkg("WhiteStripe")
    #> Loading required package: WhiteStripe

    install_pkg = function(package) {
      if (!requireNamespace(package, quietly = TRUE)) {
        remotes::install_github(paste0("neuroconductor/", package), upgrade = FALSE)
      } else {
        require(package, character.only = TRUE)
      }
    }
    install_pkg("extrantsr")
    #> Loading required package: extrantsr
    #> 
    #> Attaching package: 'extrantsr'
    #> The following object is masked from 'package:neurobase':
    #> 
    #>     zero_pad
    #> The following objects are masked from 'package:oro.nifti':
    #> 
    #>     origin, origin<-
    install_pkg("malf.templates")
    #> Loading required package: malf.templates

    ##install.packages('Rxnat')

    # Establish XNAT connections
    install_pkg("Rxnat")
    #> Loading required package: Rxnat
    nitrc <- xnat_connect("https://nitrc.org/ir", xnat_name="NITRC")
    hcp <- xnat_connect("https://db.humanconnectome.org", xnat_name = "hcp")
    hcp$is.connected()
    #> [1] TRUE
    nitrc$is.connected()
    #> [1] TRUE

    # Get list subjects from XNAT
    nitrc_subjects <- nitrc$subjects()
    head(nitrc_subjects)
    #>          project          ID        label gender handedness yob education ses
    #> 1 cs_schizbull08 xnat_S02601 BPDwoPsy_030      F          R  NA        NA  NA
    #> 2 cs_schizbull08 xnat_S02602 BPDwoPsy_031      F          R  NA        NA  NA
    #> 3 cs_schizbull08 xnat_S02603 BPDwoPsy_032      M          R  NA        NA  NA
    #> 4 cs_schizbull08 xnat_S02604 BPDwoPsy_033      M          R  NA        NA  NA
    #> 5 cs_schizbull08 xnat_S02605 BPDwoPsy_034      M          R  NA        NA  NA
    #> 6 cs_schizbull08 xnat_S02606 BPDwoPsy_035      M          R  NA        NA  NA
    #>                                 group race ethnicity
    #> 1 Bipolar Disorder: Without Psychosis   NA        NA
    #> 2 Bipolar Disorder: Without Psychosis   NA        NA
    #> 3 Bipolar Disorder: Without Psychosis   NA        NA
    #> 4 Bipolar Disorder: Without Psychosis   NA        NA
    #> 5 Bipolar Disorder: Without Psychosis   NA        NA
    #> 6 Bipolar Disorder: Without Psychosis   NA        NA
    hcp_subjects <- hcp$subjects()
    #> No internet connection or data source broken.
    #> Error in names(csv) <- c("project", "ID", "subjectid", "label", "gender", : attempt to set an attribute on NULL

Created on 2020-09-09 by the reprex package (v0.3.0)

Session info devtools::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.0.2 (2020-06-22) #> os macOS Catalina 10.15.4 #> system x86_64, darwin17.0 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/New_York #> date 2020-09-09 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib #> abind 1.4-5 2016-07-21 [2] #> ANTsR 0.5.6.1 2020-06-01 [2] #> ANTsRCore 0.7.4.6 2020-07-07 [2] #> assertthat 0.2.1 2019-03-21 [2] #> backports 1.1.9 2020-08-24 [2] #> bitops 1.0-6 2013-08-17 [2] #> callr 3.4.3 2020-03-28 [2] #> cli 2.0.2 2020-02-28 [2] #> colorspace 1.4-1 2019-03-18 [2] #> crayon 1.3.4 2017-09-16 [2] #> desc 1.2.0 2020-06-01 [2] #> devtools 2.3.1.9000 2020-08-25 [2] #> digest 0.6.25 2020-02-23 [2] #> dplyr * 1.0.2 2020-08-18 [2] #> ellipsis 0.3.1 2020-05-15 [2] #> evaluate 0.14 2019-05-28 [2] #> extrantsr * 3.9.13.1 2020-09-03 [2] #> fansi 0.4.1 2020-01-08 [2] #> fs 1.5.0 2020-07-31 [2] #> fslr * 2.24.1 2019-08-05 [2] #> generics 0.0.2 2018-11-29 [2] #> glue 1.4.2 2020-08-27 [1] #> highr 0.8 2019-03-20 [2] #> htmltools 0.5.0 2020-06-16 [2] #> httr 1.4.2 2020-07-20 [2] #> ITKR 0.5.3.2.0 2020-06-01 [2] #> knitr 1.29 2020-06-23 [2] #> lattice 0.20-41 2020-04-02 [2] #> lifecycle 0.2.0 2020-03-06 [2] #> magrittr 1.5 2014-11-22 [2] #> malf.templates * 1.2.0 2020-09-09 [1] #> Matrix 1.2-18 2019-11-27 [2] #> matrixStats 0.56.0 2020-03-13 [2] #> memoise 1.1.0 2017-04-21 [2] #> mgcv 1.8-32 2020-08-19 [2] #> munsell 0.5.0 2018-06-12 [2] #> neurobase * 1.31.0 2020-09-04 [2] #> nlme 3.1-149 2020-08-23 [2] #> oro.nifti * 0.11.0 2020-09-04 [2] #> pillar 1.4.6 2020-07-10 [2] #> pkgbuild 1.1.0 2020-07-13 [2] #> pkgconfig 2.0.3 2019-09-22 [2] #> pkgload 1.1.0 2020-05-29 [2] #> plyr 1.8.6 2020-03-03 [2] #> prettyunits 1.1.1 2020-01-24 [2] #> processx 3.4.3 2020-07-05 [2] #> ps 1.3.4 2020-08-11 [2] #> purrr 0.3.4 2020-04-17 [2] #> R.matlab 3.6.2 2018-09-27 [2] #> R.methodsS3 1.8.0 2020-02-14 [2] #> R.oo 1.23.0 2019-11-03 [2] #> R.utils 2.9.2 2019-12-08 [2] #> R6 2.4.1 2019-11-12 [2] #> Rcpp 1.0.5 2020-07-06 [2] #> RcppEigen 0.3.3.7.0 2019-11-16 [2] #> RCurl 1.98-1.2 2020-04-18 [2] #> remotes 2.2.0 2020-07-21 [2] #> rlang 0.4.7.9000 2020-09-09 [1] #> rmarkdown 2.3 2020-06-18 [2] #> RNifti 1.2.0 2020-08-25 [2] #> rprojroot 1.3-2 2018-01-03 [2] #> Rxnat * 1.0.12 2020-09-09 [1] #> scales * 1.1.1 2020-05-11 [2] #> sessioninfo 1.1.1 2018-11-05 [2] #> stapler 0.7.2 2020-07-09 [2] #> stringi 1.4.6 2020-02-17 [2] #> stringr 1.4.0 2019-02-10 [2] #> testthat 2.99.0.9000 2020-08-25 [2] #> tibble 3.0.3 2020-07-10 [2] #> tidyselect 1.1.0 2020-05-11 [2] #> usethis 1.6.1.9001 2020-08-25 [2] #> vctrs 0.3.4 2020-08-29 [1] #> WhiteStripe * 2.3.2 2019-10-01 [2] #> withr 2.2.0 2020-04-20 [2] #> xfun 0.16 2020-07-24 [2] #> yaml 2.2.1 2020-02-01 [2] #> source #> CRAN (R 4.0.0) #> Github (ANTsX/ANTsR@9c7c9b7) #> Github (muschellij2/ANTsRCore@61c37a1) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> Github (muschellij2/desc@b0c374f) #> Github (r-lib/devtools@df619ce) #> CRAN (R 4.0.0) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> Github (muschellij2/extrantsr@00c75ad) #> CRAN (R 4.0.0) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.2) #> Github (stnava/ITKR@9bdd5f8) #> CRAN (R 4.0.2) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> Github (neuroconductor/malf.templates@6fab94f) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> local #> CRAN (R 4.0.2) #> local #> CRAN (R 4.0.2) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.2) #> Github (r-lib/rlang@60c0151) #> CRAN (R 4.0.0) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> Github (neuroconductor/Rxnat@933293d) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> Github (muschellij2/stapler@79e23d2) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> Github (r-lib/testthat@6a24275) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> Github (r-lib/usethis@860c1ea) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.2) #> CRAN (R 4.0.0) #> #> [1] /Users/johnmuschelli/Library/R/4.0/library #> [2] /Library/Frameworks/R.framework/Versions/4.0/Resources/library
adigherman commented 4 years ago

Just pushed a new version to GitHub. Since I was not able to replicate this on my end, can you please run it again on yours and let me know if you are having the same problem? Thanks!

muschellij2 commented 4 years ago

Yes. Did you clear out HCP_RXNAT* variables and try again?

On Wed, Sep 9, 2020 at 5:03 PM Adi G notifications@github.com wrote:

Just pushed a new version to GitHub. Since I was not able to replicate this on my end, can you please run it again on yours and let me know if you are having the same problem? Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adigherman/Rxnat/issues/6#issuecomment-689820822, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIGPLXYEZGPSXWO436MIR3SE7USTANCNFSM4RCY2SHA .

-- Best, John

adigherman commented 4 years ago

I did. Please make sure you're using Rxnat 1.0.13 for testing.

> nitrc <- xnat_connect("https://nitrc.org/ir", xnat_name="NITRC")
> hcp <- xnat_connect("https://db.humanconnectome.org", xnat_name = "hcp")
> hcp$is.connected()
[1] TRUE
> #> [1] TRUE
> nitrc$is.connected()
[1] TRUE
> #> [1] TRUE
> 
> # Get list subjects from XNAT
> nitrc_subjects <- nitrc$subjects()
> head(nitrc_subjects)
# A tibble: 6 x 11
  project ID              label         gender handedness yob   education ses   group  race  ethnicity
  <chr>   <chr>           <chr>         <chr>  <chr>      <lgl> <lgl>     <lgl> <chr>  <chr> <chr>    
1 ABIDE   NITRC_IR_S00975 Caltech_51456 M      R          NA    NA        NA    Autism ""    ""       
2 ABIDE   NITRC_IR_S00976 Caltech_51457 M      A          NA    NA        NA    Autism ""    ""       
3 ABIDE   NITRC_IR_S00977 Caltech_51458 M      R          NA    NA        NA    Autism ""    ""       
4 ABIDE   NITRC_IR_S00978 Caltech_51459 M      R          NA    NA        NA    Autism ""    ""       
5 ABIDE   NITRC_IR_S00979 Caltech_51460 F      A          NA    NA        NA    Autism ""    ""       
6 ABIDE   NITRC_IR_S00980 Caltech_51461 M      R          NA    NA        NA    Autism ""    ""       
> hcp$close()
connection closed
> hcp_subjects <- hcp$subjects()
No internet connection or data source broken.
Session info #> devtools::session_info() #> ─ Session info #> setting value #> version R version 4.0.2 (2020-06-22) #> os macOS Catalina 10.15.6 #> system x86_64, darwin17.0 #> ui RStudio #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/New_York #> date 2020-09-10 #> #>─ Packages #> package * version date lib source #> assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.0) #> backports 1.1.9 2020-08-24 [1] CRAN (R 4.0.2) #> bitops 1.0-6 2013-08-17 [2] CRAN (R 4.0.0) #> callr 3.4.4 2020-09-07 [2] CRAN (R 4.0.2) #> cli 2.0.2 2020-02-28 [2] CRAN (R 4.0.0) #> crayon 1.3.4 2017-09-16 [2] CRAN (R 4.0.0) #> desc 1.2.0 2018-05-01 [2] CRAN (R 4.0.0) #> devtools 2.3.1 2020-07-21 [2] CRAN (R 4.0.2) #> digest 0.6.25 2020-02-23 [2] CRAN (R 4.0.0) #> ellipsis 0.3.1 2020-05-15 [2] CRAN (R 4.0.0) #> fansi 0.4.1 2020-01-08 [2] CRAN (R 4.0.0) #> fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2) #> glue 1.4.2 2020-08-27 [2] CRAN (R 4.0.2) #> httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2) #> lifecycle 0.2.0 2020-03-06 [2] CRAN (R 4.0.0) #> magrittr 1.5 2014-11-22 [2] CRAN (R 4.0.0) #> memoise 1.1.0 2017-04-21 [2] CRAN (R 4.0.0) #> pillar 1.4.6 2020-07-10 [2] CRAN (R 4.0.2) #> pkgbuild 1.1.0 2020-07-13 [2] CRAN (R 4.0.2) #> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.0) #> pkgload 1.1.0 2020-05-29 [2] CRAN (R 4.0.2) #> prettyunits 1.1.1 2020-01-24 [2] CRAN (R 4.0.0) #> processx 3.4.4 2020-09-03 [2] CRAN (R 4.0.2) #> ps 1.3.4 2020-08-11 [2] CRAN (R 4.0.2) #> R6 2.4.1 2019-11-12 [2] CRAN (R 4.0.0) #> RCurl 1.98-1.2 2020-04-18 [2] CRAN (R 4.0.0) #> remotes 2.2.0 2020-07-21 [2] CRAN (R 4.0.2) #> rlang 0.4.7 2020-07-09 [1] CRAN (R 4.0.2) #> rprojroot 1.3-2 2018-01-03 [2] CRAN (R 4.0.0) #> rstudioapi 0.11 2020-02-07 [2] CRAN (R 4.0.0) #> Rxnat * 1.0.13 2020-09-10 [1] Github (neuroconductor/Rxnat@67c244a) #> sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 4.0.0) #> testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.0) #> tibble 3.0.3 2020-07-10 [1] CRAN (R 4.0.2) #> usethis 1.6.1.9000 2020-07-06 [1] Github (r-lib/usethis@c1cb6d9) #> utf8 1.1.4 2018-05-24 [2] CRAN (R 4.0.0) #> vctrs 0.3.4 2020-08-29 [1] CRAN (R 4.0.2) #> withr 2.2.0 2020-04-20 [2] CRAN (R 4.0.0) #> #> [1] /Users/adi/Library/R/4.0/library #> [2] /Library/Frameworks/R.framework/Versions/4.0/Resources/library
muschellij2 commented 4 years ago

FYI - anything you're implementing for the paper needs to be on CRAN before we re-submit. Best, John

On Thu, Sep 10, 2020 at 11:22 AM Adi G notifications@github.com wrote:

I did. Please make sure you're using Rxnat 1.0.13 for testing.

nitrc <- xnat_connect("https://nitrc.org/ir", xnat_name="NITRC") hcp <- xnat_connect("https://db.humanconnectome.org", xnat_name = "hcp") hcp$is.connected()

[1] TRUE

> [1] TRUE

nitrc$is.connected()

[1] TRUE

> [1] TRUE

Get list subjects from XNAT

nitrc_subjects <- nitrc$subjects() head(nitrc_subjects)

A tibble: 6 x 11

project ID label gender handedness yob education ses group race ethnicity

1 ABIDE NITRC_IR_S00975 Caltech_51456 M R NA NA NA Autism "" "" 2 ABIDE NITRC_IR_S00976 Caltech_51457 M A NA NA NA Autism "" "" 3 ABIDE NITRC_IR_S00977 Caltech_51458 M R NA NA NA Autism "" "" 4 ABIDE NITRC_IR_S00978 Caltech_51459 M R NA NA NA Autism "" "" 5 ABIDE NITRC_IR_S00979 Caltech_51460 F A NA NA NA Autism "" "" 6 ABIDE NITRC_IR_S00980 Caltech_51461 M R NA NA NA Autism "" "" > hcp$close() connection closed > hcp_subjects <- hcp$subjects() No internet connection or data source broken. Session info > devtools::session_info() ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── setting value version R version 4.0.2 (2020-06-22) os macOS Catalina 10.15.6 system x86_64, darwin17.0 ui RStudio language (EN) collate en_US.UTF-8 ctype en_US.UTF-8 tz America/New_York date 2020-09-10 ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── package * version date lib source assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.0) backports 1.1.9 2020-08-24 [1] CRAN (R 4.0.2) bitops 1.0-6 2013-08-17 [2] CRAN (R 4.0.0) callr 3.4.4 2020-09-07 [2] CRAN (R 4.0.2) cli 2.0.2 2020-02-28 [2] CRAN (R 4.0.0) crayon 1.3.4 2017-09-16 [2] CRAN (R 4.0.0) desc 1.2.0 2018-05-01 [2] CRAN (R 4.0.0) devtools 2.3.1 2020-07-21 [2] CRAN (R 4.0.2) digest 0.6.25 2020-02-23 [2] CRAN (R 4.0.0) ellipsis 0.3.1 2020-05-15 [2] CRAN (R 4.0.0) fansi 0.4.1 2020-01-08 [2] CRAN (R 4.0.0) fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2) glue 1.4.2 2020-08-27 [2] CRAN (R 4.0.2) httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2) lifecycle 0.2.0 2020-03-06 [2] CRAN (R 4.0.0) magrittr 1.5 2014-11-22 [2] CRAN (R 4.0.0) memoise 1.1.0 2017-04-21 [2] CRAN (R 4.0.0) pillar 1.4.6 2020-07-10 [2] CRAN (R 4.0.2) pkgbuild 1.1.0 2020-07-13 [2] CRAN (R 4.0.2) pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.0) pkgload 1.1.0 2020-05-29 [2] CRAN (R 4.0.2) prettyunits 1.1.1 2020-01-24 [2] CRAN (R 4.0.0) processx 3.4.4 2020-09-03 [2] CRAN (R 4.0.2) ps 1.3.4 2020-08-11 [2] CRAN (R 4.0.2) R6 2.4.1 2019-11-12 [2] CRAN (R 4.0.0) RCurl 1.98-1.2 2020-04-18 [2] CRAN (R 4.0.0) remotes 2.2.0 2020-07-21 [2] CRAN (R 4.0.2) rlang 0.4.7 2020-07-09 [1] CRAN (R 4.0.2) rprojroot 1.3-2 2018-01-03 [2] CRAN (R 4.0.0) rstudioapi 0.11 2020-02-07 [2] CRAN (R 4.0.0) Rxnat * 1.0.13 2020-09-10 [1] Github (neuroconductor/Rxnat@67c244a ) sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 4.0.0) testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.0) tibble 3.0.3 2020-07-10 [1] CRAN (R 4.0.2) usethis 1.6.1.9000 2020-07-06 [1] Github (r-lib/usethis@c1cb6d9 ) utf8 1.1.4 2018-05-24 [2] CRAN (R 4.0.0) vctrs 0.3.4 2020-08-29 [1] CRAN (R 4.0.2) withr 2.2.0 2020-04-20 [2] CRAN (R 4.0.0) [1] /Users/adi/Library/R/4.0/library [2] /Library/Frameworks/R.framework/Versions/4.0/Resources/library — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or unsubscribe .
adigherman commented 4 years ago

FYI - anything you're implementing for the paper needs to be on CRAN before we re-submit. Best, John

I know :) I just want to make a single CRAN submission once I work all the issues into a new version.

muschellij2 commented 4 years ago

SOunds good -t esting now Best, John

On Thu, Sep 10, 2020 at 12:01 PM Adi G notifications@github.com wrote:

FYI - anything you're implementing for the paper needs to be on CRAN before we re-submit. Best, John … <#m6656853355239043049>

I know :) I just want to make a single CRAN submission once I work all the issues into a new version.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adigherman/Rxnat/issues/6#issuecomment-690401780, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIGPLSCYCIZH7EZIP3L6OTSFDZ35ANCNFSM4RCY2SHA .