nanostring-biostats / nanostringnctools Goto Github PK
View Code? Open in Web Editor NEWTools for NanoString Technologies nCounter Technology for reading RCC files into an ExpressionSet derived object, QC and normalization.
License: MIT License
Tools for NanoString Technologies nCounter Technology for reading RCC files into an ExpressionSet derived object, QC and normalization.
License: MIT License
currently autoplot does not pass ... arguments to pheatmap in the protoheatmap section.
It would be advantageous for users to update the heatmap at least to include clustering changes (linkage & distance row/column), but also have more general flexibility based on pheatmap itself. Determine if ... should be passed directly to pheatmap in protoheatmap or if additional explicit functions should be added.
I'm going through the GeoMX tutorial on bioconductor.
The tutorial utilizes/mentions pData and sData extensively. I wasn't able to figure out what these functions do through google searches.
Could you point me to the right direction please?
Thanks a lot!
Describe the bug
Gen 2.5 RCCs use a new letter in the scanner ID, E. This needs to be added to NCTools autoplot QC functions
To Reproduce
test Rmd and files can be found here: \hades\share\kgorman\360 Dev\Gen2.5
Fix
Add E as an option for scanner ID in NanoStringRccSet-autoplot and NanoStringRccSet-qc
checking replacement functions ... WARNING
setSigFuncs<- \S4method{setSigFuncs<-}{SignatureSet,character}
The argument of a replacement function which corresponds to the right
hand side must be named value.
checking Rd files ... [0s/0s] WARNING
checkRd: (7) NanoStringRccSet-autoplot.Rd:14-49: Tag \code is invalid in a \usage block
prepare_Rd: SignatureSet.Rd:74-75: Dropping empty section \examples
prepare_Rd: geom_beeswarm_interactive.Rd:53-54: Dropping empty section \examples
checkRd: (7) normalize.Rd:10: Tag \code is invalid in a \usage block
checkRd: (7) setQCFlags.Rd:10-20: Tag \code is invalid in a \usage block
Rd files with duplicated alias 'autoplot.NanoStringRccSet':
NanoStringRccSet-autoplot.Rd NanoStringRccSet-class.Rd
Rd files with duplicated alias 'setQCFlags':
NanoStringRccSet-class.Rd setQCFlags.Rd
Undocumented code objects:
getSigFuncs groups groups<- setSignatureFuncs<-
setSignatureGroups<- signatureFuncs signatureGroups version
version<-
Undocumented S4 methods:
generic 'getSigFuncs' and siglist 'SignatureSet'
generic 'groups' and siglist 'SignatureSet'
generic 'groups<-' and siglist 'SignatureSet,ANY'
generic 'groups<-' and siglist 'SignatureSet,NULL'
generic 'groups<-' and siglist 'SignatureSet,factor'
generic 'setSignatureFuncs<-' and siglist
'NanoStringRccSet,character'
generic 'setSignatureGroups<-' and siglist
'NanoStringRccSet,character'
generic 'setSignatureGroups<-' and siglist 'NanoStringRccSet,factor'
generic 'signatureFuncs' and siglist 'NanoStringRccSet'
generic 'signatureGroups' and siglist 'NanoStringRccSet'
generic 'version' and siglist 'SignatureSet'
generic 'version<-' and siglist 'SignatureSet,ANY'
generic 'version<-' and siglist 'SignatureSet,NULL'
generic 'version<-' and siglist 'SignatureSet,character'
generic 'weights<-' and siglist 'SignatureSet,CompressedNumericList'
All user-level objects in a package (including S4 classes and methods)
should have documentation entries.
See chapter Writing R documentation files in the Writing R
Extensions manual.
Codoc mismatches from documentation object 'SignatureSet-class':
SignatureSet
Code: function(weights = NumericList(), groups = factor(), func =
character(), version = character(), ...)
Docs: function(weights = NumericList(), ...)
Argument names in code not in docs:
groups func version
Mismatches in argument names:
Position: 2 Code: groups Docs: ...
Assignments in \usage in documentation object 'NanoStringRccSet-autoplot':
ERCCLoD = c(standardDeviations = 2)
Checking for proper Description: field...
Checking R Version dependency...
Some of the constructors for the signature set class require more flexible type matching. Specifically if you only have the signatures or if you have signatures and weights without functions.
Could you please provide the tutorial link on the Github page? or relevant documents
Hello!
I am attempting to follow the Introduction vignette for this package. When I reach the Built-in Quality Control Assessment section and try to plot QC metrics using the command:
girafe( ggobj = autoplot( demoData , "bindingDensity-mean" ) )
(or use any of the other metric types)
I get the error:
Error in check_aesthetics(): ! Aesthetics must be either length 1 or the same as the data (12): tooltip_fill
I would appreciate any help you could provide me to solve this issue. Thank you very much!
My session info:
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggiraph_0.8.2 ggthemes_4.2.4 NanoStringNCTools_1.0.0 ggplot2_3.3.6 S4Vectors_0.30.2 Biobase_2.52.0
[7] BiocGenerics_0.38.0
loaded via a namespace (and not attached):
[1] beeswarm_0.4.0 tidyselect_1.1.2 purrr_0.3.4 colorspace_2.0-3 vctrs_0.3.8 generics_0.1.3
[7] htmltools_0.5.1.1 yaml_2.2.1 utf8_1.2.2 rlang_1.0.3 pillar_1.7.0 glue_1.6.2
[13] withr_2.5.0 DBI_1.1.3 RColorBrewer_1.1-3 uuid_1.1-0 GenomeInfoDbData_1.2.6 lifecycle_1.0.1
[19] stringr_1.4.0 zlibbioc_1.38.0 Biostrings_2.60.2 munsell_0.5.0 gtable_0.3.0 htmlwidgets_1.5.4
[25] evaluate_0.15 labeling_0.4.2 IRanges_2.26.0 GenomeInfoDb_1.28.4 vipor_0.4.5 fansi_0.5.0
[31] Rcpp_1.0.8.3 scales_1.2.0 BiocManager_1.30.18 XVector_0.32.0 systemfonts_1.0.4 digest_0.6.27
[37] stringi_1.7.6 dplyr_1.0.7 grid_4.1.0 cli_3.3.0 tools_4.1.0 bitops_1.0-7
[43] magrittr_2.0.1 RCurl_1.98-1.7 tibble_3.1.3 crayon_1.5.1 pkgconfig_2.0.3 ellipsis_0.3.2
[49] pheatmap_1.0.12 ggbeeswarm_0.6.0 assertthat_0.2.1 rstudioapi_0.13 R6_2.5.1 compiler_4.1.0
nSolver normalization method multiplies endogenous gene counts with the mean of Geomean of housekeeping gene counts.
Would not mean(pcG) and mean(hkG) cause cartridge-specific batch effect as the mean value will be depending on how many samples you are using in the normalization process?
And they also make nSolver option unsuitable for the normalization of only one sample as mean(hkG)/hkG will be 1, and it will ignore the housekeeping genes.
https://github.com/Nanostring-Biostats/NanoStringNCTools/blob/master/R/NanoStringRccSet-normalize.R
Best wishes
Cankut
I am currently using this package with a dataset that has been taken through the nSolver software to see if i can get the same answers as doing the entire thing in R would greatly improve our workflow. However, I do not see an option in this package for background correction. I see there are functions for QC flagging and normalization but no background correction (thresholding or subtraction). Are these not included in this package or am I missing something? I am using version 1.8.0
Normalization values do not match those calculated using nSolver.
I suspect that object
on line 13 should be posCtrl
from the line above:
posCtrl <- positiveControlSubset(object)
If I change object
on line 13 to be posCtrl
the Content Normalization Factors and resulting normalized counts match that of nSolver. As it stands the positive control normalization factors are calculated from the entire gene set passed using object
.
Error running \hades\share\Rona\360v110\QC2\BareBonesReport using NCTools outside Rpackages
Report Error:
Quitting from lines 170-203 (BareBonesReport.Rmd)
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 't': values must be length 1,
but FUN(X[[1]]) result is length 17
Calls: ... .local -> .sigCalc -> t -> vapply -> .handleSimpleError -> h
Execution halted
The NanostringNCTools package enables independent analysis of NanoString nCounter data (e.g. RCC/RLF data) in R.
In this vignette we will:
NanoStringRCCSet was inherited from Biobase's ExpressionSet class. The NanoStringRCCSet class was designed to encapsulate data and corresponding methods for Nanostring RCC files generated from the NanoString nCounter platform.
News file should track versions and give list of features added, bugs fixes and things users should note.
Hi
After reading RCC and annotation file I get this error
> ## QC plots
> girafe( ggobj = autoplot( demoData , "lane-bindingDensity" ) )
Error:
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in `cli::cli_abort()`:
! Aesthetics must be either length 1 or the same as the data (75)
x Fix the following mappings: `hover_nearest`
Run `rlang::last_error()` to see where the error occurred.
> girafe( ggobj = autoplot( demoData , "lane-fov" ) )
Error:
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in `cli::cli_abort()`:
! Aesthetics must be either length 1 or the same as the data (75)
x Fix the following mappings: `hover_nearest`
Run `rlang::last_error()` to see where the error occurred.
> girafe( ggobj = autoplot( demoData, "housekeep-geom" ) )
Error:
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in `cli::cli_abort()`:
! Aesthetics must be either length 1 or the same as the data (75)
x Fix the following mappings: `hover_nearest`
Run `rlang::last_error()` to see where the error occurred.
> girafe( ggobj = autoplot( demoData , "ercc-linearity" ) )
Error:
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in `cli::cli_abort()`:
! Aesthetics must be either length 1 or the same as the data (375)
x Fix the following mappings: `hover_nearest`
Run `rlang::last_error()` to see where the error occurred.
> girafe( ggobj = autoplot( demoData , "ercc-lod" ) )
Error:
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 2nd layer.
Caused by error in `cli::cli_abort()`:
! Aesthetics must be either length 1 or the same as the data (75)
x Fix the following mappings: `hover_nearest`, `outlier.data_id`, `outlier.tooltip`, `outlier.onclick`,
`outlier.hover_css`, `outlier.selected_css`, `outlier.tooltip_fill`, and `outlier.hover_nearest`
Run `rlang::last_error()` to see where the error occurred.
> girafe( ggobj = autoplot( demoData , "boxplot-feature" , index = featureNames(demoData)[3] , elt = "exprs" ) )
Error in `stat_boxplot()`:
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in `cli::cli_abort()`:
! Aesthetics must be either length 1 or the same as the data (1)
x Fix the following mappings: `width`
Run `rlang::last_error()` to see where the error occurred.
> demoData <- normalize( demoData , type="nSolver", fromELT = "exprs" , toELT = "exprs_norm" )
Error in normalize(demoData, type = "nSolver", fromELT = "exprs", toELT = "exprs_norm") :
unused arguments (type = "nSolver", fromELT = "exprs", toELT = "exprs_norm")
> autoplot( demoData , "heatmap-genes" , elt = "exprs_norm" )
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 't': 'elt' not present in assayData(object)
>
> demoData
NanoStringRccSet (storageMode: lockedEnvironment)
assayData: 784 features, 75 samples
element names: exprs
protocolData
sampleNames: _01_04.RCC _01_05.RCC ...
(75 total)
varLabels: FileVersion SoftwareVersion ... Sample ID (18 total)
varMetadata: labelDescription
phenoData
sampleNames: _01_04.RCC _01_05.RCC ...
(75 total)
varLabels: Group
varMetadata: labelDescription
featureData
featureNames: Endogenous_CCNO_NM_021147.4 Endogenous_MYC_NM_002467.3 ... Housekeeping_ERCC3_NM_000122.1 (784
total)
fvarLabels: CodeClass GeneName ... BarcodeComments (10 total)
fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: NS_IO_360_v1.0
signature: none
>
Thanks for any help
Currently, .rccMetadata is required to read one rcc file. Either the readRccFile function should not be exported or this function should access rccMetadata through a member access function instead of directly calling.
Description file: * Checking for valid maintainer...
Unit Tests
checking tests ...
Running run_unitTests.R [14s/14s]
[15s/15s] ERROR
Running the tests in tests/run_unitTests.R failed.
Last 20 lines of output:
test_NanoStringRccSet_valid_signatures
test_NanoStringRccSet-munge.R
/home/pkgbuild/packagebuilder/workers/jobs/1815/NanoStringNCTools_20201216223312/NanoStringNCTools.Rcheck/NanoStringNCTools/unitTests/test_NanoStringRccSet-munge.R
test_NanoStringRccSet-signatures.R
/home/pkgbuild/packagebuilder/workers/jobs/1815/NanoStringNCTools_20201216223312/NanoStringNCTools.Rcheck/NanoStringNCTools/unitTests/test_NanoStringRccSet-signatures.R
test_NanoStringRccSet-subset.R
/home/pkgbuild/packagebuilder/workers/jobs/1815/NanoStringNCTools_20201216223312/NanoStringNCTools.Rcheck/NanoStringNCTools/unitTests/test_NanoStringRccSet-subset.R
test_NanoStringRccSet-summary.R
/home/pkgbuild/packagebuilder/workers/jobs/1815/NanoStringNCTools_20201216223312/NanoStringNCTools.Rcheck/NanoStringNCTools/unitTests/test_NanoStringRccSet-summary.R
test_NanoStringRccSet-utils.R
/home/pkgbuild/packagebuilder/workers/jobs/1815/NanoStringNCTools_20201216223312/NanoStringNCTools.Rcheck/NanoStringNCTools/unitTests/test_NanoStringRccSet-utils.R
Error in BiocGenerics:::testPackage("NanoStringNCTools") :
unit tests failed for package NanoStringNCTools
The following are edits from Rpackages missing from NCTools
Autoplot:
@rvitancol and @dnadave, I confirmed that these are the only edits still missing that didn't make it into NCTools during the repo split.
Per Bioconductor preferences we should switch the last sapply to at least a vapply. The issue with this is we allow the user to have any input and return type and apply as they wish across feature or sample annotations. They have accepted our package as is with the last sapply, but we should consider if there are ways to keep the flexibility whilst removing the sapply.
Report related issues:
http://hades:62495/files/hades/Rona/360v110/QC2/BareBonesReport.html#quality-control-details
NanoStringNCTools review (Bioconductor/Contributions#1815 (comment))
NAMESPACE
Build report warnings
NOTE: These are the NOTES i'm particular about, please address these. The rest of them are also solvable for the most part (at least the ones you see on the linux builder)
NOTE: Avoid sapply(); use vapply()
NOTE: Consider adding runnable examples to the following man
pages which document exported objects:
geom_beeswarm_interactive.Rd, SignatureSet.Rd
NOTE: Consider adding a NEWS file, so your package news will be
included in Bioconductor release announcements.
The windows build machine issue can be addressed by @hpages better.
R
check http://bioconductor.org/developers/how-to/coding-style/ .
Remove commented out lines of code.
I'm not sure why your zzz.R has the 'testPackage' function called inside of it. This usually isn't the way zzz.R is used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.