hyginn / rete Goto Github PK
View Code? Open in Web Editor NEWNetwork Analysis for Cell- and Systems Biology
Network Analysis for Cell- and Systems Biology
I ended up just generating a small rds file for each SNV and CNA using minimal dataset.
For R CMD check results,
R CMD check succeeded
My code should be done but none of the shortcuts work for me. i.e.
Build and Reload Package: 'Cmd + Shift + B'
Update Documentation: 'Cmd + Shift + D' or devtools::document()
Test Package: 'Cmd + Shift + T'
Check Package: 'Cmd + Shift + E'
Created a pull request regarding this addition.
Comments are tagged
Almost ready for merge.
Getting note that no visible global function definition for ‘hash’, after require(hash) in testthat.
Is there a proper way to attach hash to global dependency?
Please review and let me know anything needed to add!
GitHub didn't want to let me make a second fork, so I'm working in a clean branch. The only code that looked clean enough from my perspective to convert to dots (that needed conversion) was importM-COSMIC. COMBINE will also need more extensive work to match the expected interface, as it expects SNV data to be RDS, not tab-delimited text.
Current state of the code:
master...seneca-c:convertBarcode
At https://github.com/hyginn/rete/blob/master/R/importNet.STRING.R#L116-#L117, fname
is assigned twice:
fCall[2] <- sprintf('fname = "%s", ', fName)
fCall[2] <- sprintf("fname = \"%s\", ", fName)
Not sure if the escapes and single/double quotes were originally meant for compatibility with different OSes somehow. Both give me the same output on Linux.
Uploaded pseudo code
https://github.com/bronnil/rete/blob/master/R/importNet.MITAB.R
I realized I had a conflict last time which is why I was unable to push my code. This pseudocode should hopefully be a lot better. Thanks
Not sure how to check that symmetric edges are correctly added if requested also uploaded new code. in version 2
https://github.com/bronnil/rete/blob/master/tests/testthat/testImportNet(Version2).MITAB.R
Package Check:
==> devtools::check(document = FALSE)
Setting env vars ---------------------------------------------------------------
CFLAGS : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building rete ------------------------------------------------------------------
"C:/PROGRA1/R/R-331.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD build
"C:\Users\Hari\OneDrive\Documents\University\Year 4\Spring
2017\BCB420H1\rete" --no-resave-data --no-manual
checking for file 'C:\Users\Hari\OneDrive\Documents\University\Year 4\Spring 2017\BCB420H1\rete/DESCRIPTION' ... OK
preparing 'rete':
checking DESCRIPTION meta-information ... OK
excluding invalid files
Subdirectory 'R' contains invalid file names:
'CosmicHGNC.tsv' 'cosmicCNV.rds' 'testCosmicCNA.tsv'
'testCosmicCNAEmpty.tsv'
checking for LF line-endings in source and make files
checking for empty or unneeded directories
building 'rete_0.1.0.tar.gz'
Setting env vars ---------------------------------------------------------------
R_CHECK_CRAN_INCOMING : FALSE
R_CHECK_FORCE_SUGGESTS: FALSE
Checking rete ------------------------------------------------------------------
"C:/PROGRA1/R/R-331.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD check
"C:\Users\Hari\AppData\Local\Temp\RtmpszmyRQ/rete_0.1.0.tar.gz" --as-cran
--timings --no-manual
using log directory 'C:/Users/Hari/OneDrive/Documents/University/Year 4/Spring 2017/BCB420H1/rete.Rcheck'
using R version 3.3.2 (2016-10-31)
using platform: x86_64-w64-mingw32 (64-bit)
using session charset: ISO8859-1
using options '--no-manual --as-cran'
checking for file 'rete/DESCRIPTION' ... OK
checking extension type ... Package
this is package 'rete' version '0.1.0'
package encoding: UTF-8
checking package namespace information ... OK
checking package dependencies ... OK
checking if this is a source package ... OK
checking if there is a namespace ... OK
checking for executable files ... OK
checking for hidden files and directories ... OK
checking for portable file names ... OK
checking whether package 'rete' can be installed ... OK
checking installed package size ... OK
checking package directory ... OK
checking DESCRIPTION meta-information ... OK
checking top-level files ... OK
checking for left-over files ... OK
checking index information ... OK
checking package subdirectories ... OK
checking R files for non-ASCII characters ... OK
checking R files for syntax errors ... OK
checking whether the package can be loaded ... OK
checking whether the package can be loaded with stated dependencies ... OK
checking whether the package can be unloaded cleanly ... OK
checking whether the namespace can be loaded with stated dependencies ... OK
checking whether the namespace can be unloaded cleanly ... OK
checking loading without being on the library search path ... OK
checking dependencies in R code ... OK
checking S3 generic/method consistency ... OK
checking replacement functions ... OK
checking foreign function calls ... OK
checking R code for possible problems ... OK
checking Rd files ... OK
checking Rd metadata ... OK
checking Rd line widths ... OK
checking Rd cross-references ... OK
checking for missing documentation entries ... OK
checking for code/documentation mismatches ... OK
checking Rd \usage sections ... OK
checking Rd contents ... OK
checking for unstated dependencies in examples ... OK
checking examples ... OK
checking for unstated dependencies in 'tests' ... OK
checking tests ...
Running 'testthat.R' OK
DONE
Status: OK
R CMD check results
0 errors | 0 warnings | 0 notes
R CMD check succeeded
I made input test files and true output files separate.They are no longer created in the test itself since it was causing some issues during testing.
Here is the R CMD output:
==> devtools::check(document = FALSE)
Setting env vars ---------------------------------------------------------------
CFLAGS : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building rete ------------------------------------------------------------------
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet
CMD build '/home/pruthvi/Desktop/rete' --no-resave-data --no-manual
Setting env vars ---------------------------------------------------------------
R_CHECK_CRAN_INCOMING_USE_ASPELL: TRUE
R_CHECK_CRAN_INCOMING : FALSE
R_CHECK_FORCE_SUGGESTS : FALSE
Checking rete ------------------------------------------------------------------
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet
CMD check '/tmp/RtmpOsK71L/rete_0.1.0.tar.gz' --as-cran --timings
--no-manual
using log directory ‘/home/pruthvi/Desktop/rete.Rcheck’
using R version 3.3.3 (2017-03-06)
using platform: x86_64-pc-linux-gnu (64-bit)
using session charset: UTF-8
using options ‘--no-manual --as-cran’
checking for file ‘rete/DESCRIPTION’ ... OK
checking extension type ... Package
this is package ‘rete’ version ‘0.1.0’
package encoding: UTF-8
checking package namespace information ... OK
checking package dependencies ... OK
checking if this is a source package ... OK
checking if there is a namespace ... OK
checking for executable files ... OK
checking for hidden files and directories ... OK
checking for portable file names ... OK
checking for sufficient/correct file permissions ... OK
checking whether package ‘rete’ can be installed ... OK
checking installed package size ... OK
checking package directory ... OK
checking DESCRIPTION meta-information ... OK
checking top-level files ... OK
checking for left-over files ... OK
checking index information ... OK
checking package subdirectories ... OK
checking R files for non-ASCII characters ... OK
checking R files for syntax errors ... OK
checking whether the package can be loaded ... OK
checking whether the package can be loaded with stated dependencies ... OK
checking whether the package can be unloaded cleanly ... OK
checking whether the namespace can be loaded with stated dependencies ... OK
checking whether the namespace can be unloaded cleanly ... OK
checking loading without being on the library search path ... OK
checking dependencies in R code ... OK
checking S3 generic/method consistency ... OK
checking replacement functions ... OK
checking foreign function calls ... OK
checking R code for possible problems ... NOTE
.mafHeaderCheck: no visible global function definition for ‘read.table’
.rSNVheadercheck: no visible global function definition for
‘read.table’
importSNV.TCGA: no visible global function definition for ‘read.table’
importSNV.TCGA: no visible global function definition for
‘complete.cases’
importSNV.TCGA: no visible global function definition for ‘write.table’
Undefined global functions or variables:
complete.cases read.table write.table
Consider adding
importFrom("stats", "complete.cases")
importFrom("utils", "read.table", "write.table")
to your NAMESPACE file.
checking Rd files ... OK
checking Rd metadata ... OK
checking Rd line widths ... OK
checking Rd cross-references ... OK
checking for missing documentation entries ... OK
checking for code/documentation mismatches ... OK
checking Rd \usage sections ... OK
checking Rd contents ... OK
checking for unstated dependencies in examples ... OK
checking examples ... OK
checking for unstated dependencies in ‘tests’ ... OK
checking tests ...
Running ‘testthat.R’ ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
Welcome to rete.
Object details will be logged to
"/home/pruthvi/Desktop/rete.Rcheck/tests/rete_2017-03-29.1.log"
or type ?logfile for instructions to set a different name.
test_check("rete")
Error in importNet.STRING(fName = "dataString.txt", net = "experimental", :
.checkArgs> "fName" error: file "dataString.txt" does not exist.
Calls: test_check ... force -> source_file -> eval -> eval -> importNet.STRING
testthat results ================================================================
OK: 0 SKIPPED: 0 FAILED: 0
Execution halted
DONE
Status: 1 ERROR, 1 NOTE
checking tests ... ERROR
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
Welcome to rete.
Object details will be logged to
"/home/pruthvi/Desktop/rete.Rcheck/tests/rete_2017-03-29.1.log"
or type ?logfile for instructions to set a different name.
test_check("rete")
Error in importNet.STRING(fName = "dataString.txt", net = "experimental", :
.checkArgs> "fName" error: file "dataString.txt" does not exist.
Calls: test_check ... force -> source_file -> eval -> eval -> importNet.STRING
testthat results ================================================================
OK: 0 SKIPPED: 0 FAILED: 0
Execution halted
checking R code for possible problems ... NOTE
.mafHeaderCheck: no visible global function definition for ‘read.table’
.rSNVheadercheck: no visible global function definition for
‘read.table’
importSNV.TCGA: no visible global function definition for ‘read.table’
importSNV.TCGA: no visible global function definition for
‘complete.cases’
importSNV.TCGA: no visible global function definition for ‘write.table’
Undefined global functions or variables:
complete.cases read.table write.table
Consider adding
importFrom("stats", "complete.cases")
importFrom("utils", "read.table", "write.table")
to your NAMESPACE file.
See
‘/home/pruthvi/Desktop/rete.Rcheck/00check.log’
for details.
R CMD check results
1 error | 0 warnings | 1 note
R CMD check succeeded
Can be found here
Output of check
==> devtools::check(document = FALSE)
Setting env vars ---------------------------------------------------------------
CFLAGS : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building rete ------------------------------------------------------------------
"C:/PROGRA1/R/R-331.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD build
"C:\Users\HPDM1\Documents\CanadaUofT\4thYear\BCB420\rete" --no-resave-data
--no-manual
Setting env vars ---------------------------------------------------------------
R_CHECK_CRAN_INCOMING : FALSE
R_CHECK_FORCE_SUGGESTS: FALSE
Checking rete ------------------------------------------------------------------
"C:/PROGRA1/R/R-331.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD check
"C:\Users\HPDM1\AppData\Local\Temp\RtmpcP12Ns/rete_0.1.0.tar.gz" --as-cran
--timings --no-manual
using log directory 'C:/Users/HPDM1/Documents/CanadaUofT/4thYear/BCB420/rete.Rcheck'
using R version 3.3.2 (2016-10-31)
using platform: x86_64-w64-mingw32 (64-bit)
using session charset: ISO8859-1
using options '--no-manual --as-cran'
checking for file 'rete/DESCRIPTION' ... OK
checking extension type ... Package
this is package 'rete' version '0.1.0'
package encoding: UTF-8
checking package namespace information ... OK
checking package dependencies ... OK
checking if this is a source package ... OK
checking if there is a namespace ... OK
checking for executable files ... OK
checking for hidden files and directories ... OK
checking for portable file names ... OK
checking whether package 'rete' can be installed ... OK
checking installed package size ... OK
checking package directory ... OK
checking DESCRIPTION meta-information ... OK
checking top-level files ... NOTE
Non-standard files/directories found at top level:
'aggRef.Rdata' 'eggRef.Rdata' 'rete_2017-03-29.1.log'
'rete_2017-03-30.1.log' 'rete_2017-03-30.2.log'
'rete_2017-03-30.3.log'
checking for left-over files ... OK
checking index information ... OK
checking package subdirectories ... OK
checking R files for non-ASCII characters ... OK
checking R files for syntax errors ... OK
checking whether the package can be loaded ... OK
checking whether the package can be loaded with stated dependencies ... OK
checking whether the package can be unloaded cleanly ... OK
checking whether the namespace can be loaded with stated dependencies ... OK
checking whether the namespace can be unloaded cleanly ... OK
checking loading without being on the library search path ... OK
checking dependencies in R code ... OK
checking S3 generic/method consistency ... OK
checking replacement functions ... OK
checking foreign function calls ... OK
checking R code for possible problems ... OK
checking Rd files ... OK
checking Rd metadata ... OK
checking Rd line widths ... OK
checking Rd cross-references ... OK
checking for missing documentation entries ... WARNING
Undocumented code objects:
'importSNV.TCGA'
All user-level objects in a package should have documentation entries.
See chapter 'Writing R documentation files' in the 'Writing R
Extensions' manual.
checking for code/documentation mismatches ... OK
checking Rd \usage sections ... OK
checking Rd contents ... OK
checking for unstated dependencies in examples ... OK
checking examples ... OK
checking for unstated dependencies in 'tests' ... OK
checking tests ...
Running 'testthat.R'
Warning message:
running command '"C:/PROGRA1/R/R-331.2/bin/x64/R" CMD BATCH --vanilla "testthat.R" "testthat.Rout"' had status 1
ERROR
Running the tests in 'tests/testthat.R' failed.
Last 13 lines of output:
grepl(sprintf("fgX = "%s"", testF), thisLog[3]) isn't true.
Error in inherits(v, "igraph.vs") : could not find function "V"
Calls: test_check ... eval -> eval -> -> as.igraph.vs -> inherits
testthat results ================================================================
OK: 40 SKIPPED: 0 FAILED: 3
Error: testthat unit tests failed
Execution halted
DONE
Status: 1 ERROR, 1 WARNING, 1 NOTE
See
'C:/Users/HPDM1/Documents/CanadaUofT/4thYear/BCB420/rete.Rcheck/00check.log'
for details.
checking tests ... ERROR
Running the tests in 'tests/testthat.R' failed.
Last 13 lines of output:
grepl(sprintf("fgX = "%s"", testF), thisLog[3]) isn't true.
Error in inherits(v, "igraph.vs") : could not find function "V"
Calls: test_check ... eval -> eval -> -> as.igraph.vs -> inherits
testthat results ================================================================
OK: 40 SKIPPED: 0 FAILED: 3
Error: testthat unit tests failed
Execution halted
checking for missing documentation entries ... WARNING
Undocumented code objects:
'importSNV.TCGA'
All user-level objects in a package should have documentation entries.
See chapter 'Writing R documentation files' in the 'Writing R
Extensions' manual.
checking top-level files ... NOTE
Non-standard files/directories found at top level:
'aggRef.Rdata' 'eggRef.Rdata' 'rete_2017-03-29.1.log'
'rete_2017-03-30.1.log' 'rete_2017-03-30.2.log'
'rete_2017-03-30.3.log'
R CMD check results
1 error | 1 warning | 1 note
R CMD check succeeded
I've read over the requirements, I didnt revise them (didnt find anything that needed revising) but I have some questions about them posted here.
I think the pseudocode is done now, except for a couple of things that I was unsure of which I have mentioned in the comments. Thanks.
Hi Boris,
I uploaded some tests with special attention to the === LOOK HERE==== section.
Youll be able to tell I dont know how to test the gG object... Ive tried looking on the wiki to understand the structure to no avail.
https://github.com/bronnil/rete/blob/master/tests/testthat/testImportNet(Version%202).MITAB.R
Namely, question on line 77.
Also want to check approach for processing each file.
Hi Boris,
I've made some modifications to the import module. Please see my open pull request for the changes.
Here is the package check:
==> devtools::check(document = FALSE)
Setting env vars ---------------------------------------------------------------
CFLAGS : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building rete ------------------------------------------------------------------
"C:/PROGRA1/R/R-331.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD build
"C:\Users\Hari\OneDrive\Documents\University\Year 4\Spring
2017\BCB420H1\rete" --no-resave-data --no-manual
Setting env vars ---------------------------------------------------------------
R_CHECK_CRAN_INCOMING : FALSE
R_CHECK_FORCE_SUGGESTS: FALSE
Checking rete ------------------------------------------------------------------
"C:/PROGRA1/R/R-331.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD check
"C:\Users\Hari\AppData\Local\Temp\Rtmpghk15Q/rete_0.1.0.tar.gz" --as-cran
--timings --no-manual
R CMD check results
0 errors | 0 warnings | 0 notes
R CMD check succeeded
Available here.
So... I changed string to mitab. made a smaller coresnippet.psimitab
found how to count vertices and how to get edge weight.
Not sure how to find dropped?
No clue whatsoever about what Im checking wrt translations
https://github.com/bronnil/rete/blob/master/tests/testthat/testImportNet(Version%202).MITAB.R
Hi Boris,
I can't figure out how to test the scores of importNet.MITAB. It creates the scores in the middle of the function how do I get them out? If I should test when it is in a gG object that ut returns I dont know how to do that either.
Also "check that ID translation works"... not sure what this is referring to I didnt translate any IDs? do you mean when I clean the "uniprot:"? Again not sure how to test this if its done in the middle of the function?
R CMD check results on pull request page
test_that("isGeneSymbol identifies invalid gene symbols", {
# Input contains invalid (non-HGNC) gene symbols.
input <- c("", "!@#", "AR3bsdt!", "123")
expected_output <- c(FALSE, FALSE, FALSE, FALSE)
expect_equal(isGeneSymbol(input), expected_output)
test_that("isGeneSymbol identifies correct gene symbols, and input is case insensitive", {
# Input contains correct HGNC gene symbols.
input <- c("A1BG", "a1bg", "A1bG", "a1Bg")
expected_output <- c(TRUE, TRUE, TRUE, TRUE)
expect_equal(isGeneSymbol(input), expected_output)
test_that("a corrupt input does not lead to corrupted output", {
# Input is corrupted (NULL, NA, vector of length zero, or no input at all).
expect_error(isGeneSymbol())
expect_error(isGeneSymbol(c()))
expect_error(isGeneSymbol(NULL))
expect_error(isGeneSymbol(NA))
Hi Boris,
I have amended my import module. Please find the package check below.
Thanks,
Hari
Package Check:
==> devtools::check(document = FALSE)
Setting env vars ---------------------------------------------------------------
CFLAGS : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building rete ------------------------------------------------------------------
"C:/PROGRA1/R/R-331.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD build
"C:\Users\Hari\OneDrive\Documents\University\Year 4\Spring
2017\BCB420H1\rete" --no-resave-data --no-manual
Setting env vars ---------------------------------------------------------------
R_CHECK_CRAN_INCOMING : FALSE
R_CHECK_FORCE_SUGGESTS: FALSE
Checking rete ------------------------------------------------------------------
"C:/PROGRA1/R/R-331.2/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD check
"C:\Users\Hari\AppData\Local\Temp\Rtmp6F2ir5/rete_0.1.0.tar.gz" --as-cran
--timings --no-manual
R CMD check results
0 errors | 0 warnings | 0 notes
R CMD check succeeded
Ive uploaded the pseudo code for tests... its nearly identical to ImportString tests- almost all are valid and I cant see anything more to add?
https://github.com/bronnil/rete/blob/master/tests/testthat/testImportNet.MITAB.R
==> devtools::check(document = FALSE)
Setting env vars ---------------------------------------------------------------
CFLAGS : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building rete ------------------------------------------------------------------
'/usr/local/Cellar/r/3.3.2/R.framework/Resources/bin/R' --no-site-file \
--no-environ --no-save --no-restore --quiet CMD build \
'/Users/wonjunetai/Desktop/BCB420/rete' --no-resave-data --no-manual
* checking for file ‘/Users/wonjunetai/Desktop/BCB420/rete/DESCRIPTION’ ... OK
* preparing ‘rete’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ‘rete_0.1.0.tar.gz’
Setting env vars ---------------------------------------------------------------
_R_CHECK_CRAN_INCOMING_ : FALSE
_R_CHECK_FORCE_SUGGESTS_: FALSE
Checking rete ------------------------------------------------------------------
'/usr/local/Cellar/r/3.3.2/R.framework/Resources/bin/R' --no-site-file \
--no-environ --no-save --no-restore --quiet CMD check \
'/var/folders/3r/wfwrqs2n4x934_wg4jssflm80000gn/T//RtmpD7D9aq/rete_0.1.0.tar.gz' \
--as-cran --timings --no-manual
* using log directory ‘/Users/wonjunetai/Desktop/BCB420/rete.Rcheck’
* using R version 3.3.2 (2016-10-31)
* using platform: x86_64-apple-darwin16.1.0 (64-bit)
* using session charset: UTF-8
* using options ‘--no-manual --as-cran’
* checking for file ‘rete/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘rete’ version ‘0.1.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘rete’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘testthat.R’ OK
* DONE
Status: OK
R CMD check results
0 errors | 0 warnings | 0 notes
R CMD check succeeded
I responded to the comments. Thanks for the feedback.
Is it working?
> test_that("isGeneSymbol identifies invalid input", {
+ # Input contains invalid input.
+ input <- c(TRUE, 3.14, data.frame(key=c(1,2)), c(1,2,3))
+ expect_error(isGeneSymbol())
+ expect_error(isGeneSymbol(c()))
+ expect_error(isGeneSymbol(NULL))
+ expect_error(isGeneSymbol(input))
+ expect_error(isGeneSymbol(TRUE))
+ expect_error(isGeneSymbol(3.14))
+ expect_error(isGeneSymbol(data.frame(key=c(1,2))))
+ expect_error(isGeneSymbol(c(1,2,3)))
+ expect_error(isGeneSymbol(NA))
+ })
> test_that("isGeneSymbol identifies correct gene symbols,
+ and input is case insensitive", {
+ # Input contains correct HGNC gene symbols.
+ input <- c("A1BG", "a1bg", "A1bG", "a1Bg")
+ expected_output <- c(TRUE, TRUE, TRUE, TRUE)
+ expect_equal(isGeneSymbol(input), expected_output)
+ })
> test_that("isGeneSymbol identifies incorrect gene symbols
+ that are not present in the table", {
+ # Input includes symbols not present in the table.
+ input <- c("1234", "!@#$@", NA)
+ expected_output <- c(FALSE, FALSE, FALSE)
+ expect_equal(isGeneSymbol(input), expected_output)
+ })
(#90)
Checking whether non-collaborators can post issues.
I have tagged @hyginn at the beginning of my new responses, for visual grepping.
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.