use of ubic.gemma.model.genome.biosequence.BioSequence in project Gemma by PavlidisLab.
the class SimpleFastaCmdTest method testGetSingle.
@Test
public void testGetSingle() {
if (this.fastaCmdExecutableNotExists()) {
return;
}
SimpleFastaCmd fastaCmd = new SimpleFastaCmd();
BioSequence bs = fastaCmd.getByIdentifier(1435867, SimpleFastaCmdTest.TESTBLASTDB, testBlastDbPath);
assertNotNull(bs);
String expected = "CCACCTTTCCCTCCACTCCTCACGTTCTCACCTGTAAAGCGTCCCTCCCTCATCCCCATGCCCCCTTACCCTGCAGGGTA" + "GAGTAGGCTAGAAACCAGAGAGCTCCAAGCTCCATCTGTGGAGAGGTGCCATCCTTGGGCTGCAGAGAGAGGAGAATTTG" + "CCCCAAAGCTGCCTGCAGAGCTTCACCACCCTTAGTCTCACAAAGCCTTGAGTTCATAGCATTTCTTGAGTTTTCACCCT" + "GCCCAGCAGGACACTGCAGCACCCAAAGGGCTTCCCAGGAGTAGGGTTGCCCTCAAGAGGCTCTTGGGTCTGATGGCCAC" + "ATCCTGGAATTGTTTTCAAGTTGATGGTCACAGCCCTGAGGCATGTAGGGGCGTGGGGATGCGCTCTGCTCTGCTCTCCT" + "CTCCTGAACCCCTGAACCCTCTGGCTACCCCAGAGCACTTAGAGCCAG";
assertEquals(expected, bs.getSequence());
}
use of ubic.gemma.model.genome.biosequence.BioSequence in project Gemma by PavlidisLab.
the class SimpleFastaCmdTest method testGetSingleAcc.
@Test
public void testGetSingleAcc() {
if (this.fastaCmdExecutableNotExists()) {
return;
}
SimpleFastaCmd fastaCmd = new SimpleFastaCmd();
String accession = "AA000002";
BioSequence bs = fastaCmd.getByAccession(accession, SimpleFastaCmdTest.TESTBLASTDB, testBlastDbPath);
assertNotNull("fastacmd failed to find " + accession, bs);
String expected = "CCACCTTTCCCTCCACTCCTCACGTTCTCACCTGTAAAGCGTCCCTCCCTCATCCCCATGCCCCCTTACCCTGCAGGGTA" + "GAGTAGGCTAGAAACCAGAGAGCTCCAAGCTCCATCTGTGGAGAGGTGCCATCCTTGGGCTGCAGAGAGAGGAGAATTTG" + "CCCCAAAGCTGCCTGCAGAGCTTCACCACCCTTAGTCTCACAAAGCCTTGAGTTCATAGCATTTCTTGAGTTTTCACCCT" + "GCCCAGCAGGACACTGCAGCACCCAAAGGGCTTCCCAGGAGTAGGGTTGCCCTCAAGAGGCTCTTGGGTCTGATGGCCAC" + "ATCCTGGAATTGTTTTCAAGTTGATGGTCACAGCCCTGAGGCATGTAGGGGCGTGGGGATGCGCTCTGCTCTGCTCTCCT" + "CTCCTGAACCCCTGAACCCTCTGGCTACCCCAGAGCACTTAGAGCCAG";
assertEquals(expected, bs.getSequence());
}
use of ubic.gemma.model.genome.biosequence.BioSequence in project Gemma by PavlidisLab.
the class RepeatScanTest method testFraction.
public final void testFraction() {
BioSequence b = BioSequence.Factory.newInstance();
b.setSequence("AAAaaaaAAAAaaa");
RepeatScan r = new RepeatScan();
double d = r.computeFractionMasked(b);
assertEquals(0.5, d, 0.001);
}
use of ubic.gemma.model.genome.biosequence.BioSequence in project Gemma by PavlidisLab.
the class GeoConverterTest method testWithImageNoGenbank.
/*
* Platform has IMAGE:CCCCC in CLONE_ID column, no genbank accessions anywhere.
*/
@Test
public final void testWithImageNoGenbank() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GPL222_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.setProcessPlatformsOnly(true);
parser.parse(is);
GeoPlatform platform = ((GeoParseResult) parser.getResults().iterator().next()).getPlatformMap().get("GPL222");
Object result = this.gc.convert(platform);
ArrayDesign ad = (ArrayDesign) result;
for (CompositeSequence cs : ad.getCompositeSequences()) {
BioSequence bs = cs.getBiologicalCharacteristic();
assertTrue(bs.getName().startsWith("IMAGE"));
}
}
use of ubic.gemma.model.genome.biosequence.BioSequence in project Gemma by PavlidisLab.
the class GeoConverterTest method testImageClones.
/*
* We should not longer use IMAGE:XXXXX as the sequence name.
*/
@Test
public void testImageClones() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GPL226_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoPlatform platform = ((GeoParseResult) parser.getResults().iterator().next()).getPlatformMap().get("GPL226");
Object result = this.gc.convert(platform);
ArrayDesign ad = (ArrayDesign) result;
assertNotNull(ad);
for (CompositeSequence cs : ad.getCompositeSequences()) {
BioSequence bs = cs.getBiologicalCharacteristic();
assertTrue("Got: " + bs.getName(), !bs.getName().startsWith("IMAGE") || bs.getSequenceDatabaseEntry() == null);
}
}
Aggregations