inst/unitTests/test_otherFunctions.R

library(RUnit)

## Test flattenDotBracket

checkEquals(flattenDotBracket("...((((..[[.))))]]"), "...((((..((.))))))")

## Test readCT

testCTFile <- system.file("extdata", "exampleCT.ct", package="ncRNAtools")
tmRNASequence <- "GGGGCUGAUUCUGGAUUCGACGGGAUUUGCGAAACCCAAGGUGCAUGCCGAGGGGCGGUUGGCCUCGUAAAAAGCCGCAAAAAAUAGUCGCAAACGACGAAAACUACGCUUUAGCAGCUUAAUAACCUGCUUAGAGCCCUCUCUCCCUAGCCUCCGCUCUUAGGACGGGGAUCAAGAGAGGUCAAACCCAAAAGAGAUCGCGUGGAAGCCCUGCCUGGGGUUGAAGCGUUAAAACUUAAUCAGGCUAGUUUGUUAGUGGCGUGUCCGUCCGCAGCUGGCAAGCGAAUGUAAAGACUGACUAAGCAUGUAGUACCGAGGAUGUAGGAAUUUCGGACGCGGGUUCAACUCCCGCCAGCUCCACCA"

checkTrue(nrow(readCT(testCTFile, tmRNASequence)$pairsTable) == 15)

## Test readDotBracket

testDotBracketFile <- system.file("extdata", "exampleDotBracket.dot", package="ncRNAtools")

checkTrue(readDotBracket(testDotBracketFile)$freeEnergy == -41.2)

Try the ncRNAtools package in your browser

Any scripts or data that you put into this service are public.

ncRNAtools documentation built on Nov. 8, 2020, 8:14 p.m.