use of ubic.gemma.core.apps.Blat in project Gemma by PavlidisLab.
the class ProbeMapperImpl method processSequences.
@Override
public Map<String, Collection<BlatAssociation>> processSequences(GoldenPathSequenceAnalysis goldenpath, Collection<BioSequence> sequences, ProbeMapperConfig config) {
Blat b = new ShellDelegatingBlat();
b.setBlatScoreThreshold(config.getBlatScoreThreshold());
try {
Map<BioSequence, Collection<BlatResult>> results = b.blatQuery(sequences, goldenpath.getTaxon());
Collection<BlatResult> blatRes = new HashSet<>();
for (Collection<BlatResult> coll : results.values()) {
blatRes.addAll(coll);
}
return this.processBlatResults(goldenpath, blatRes);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
use of ubic.gemma.core.apps.Blat in project Gemma by PavlidisLab.
the class ProbeMapperImpl method processSequence.
@Override
public Collection<BlatAssociation> processSequence(GoldenPathSequenceAnalysis goldenPath, BioSequence sequence) {
Blat b = new ShellDelegatingBlat();
b.setBlatScoreThreshold((new ProbeMapperConfig()).getBlatScoreThreshold());
Collection<BlatResult> results;
try {
results = b.blatQuery(sequence, goldenPath.getTaxon(), false);
} catch (IOException e) {
throw new RuntimeException("Error running blat", e);
}
Map<String, Collection<BlatAssociation>> allRes = this.processBlatResults(goldenPath, results);
assert allRes.keySet().size() == 1;
return allRes.values().iterator().next();
}
use of ubic.gemma.core.apps.Blat in project Gemma by PavlidisLab.
the class ArrayDesignSequenceAlignmentandMappingTest method testProcessArrayDesign.
@Test
public final void testProcessArrayDesign() throws Exception {
ad = arrayDesignService.thaw(ad);
Collection<BioSequence> seqs = app.processArrayDesign(ad, new String[] { "testblastdb", "testblastdbPartTwo" }, FileTools.resourceToPath("/data/loader/genome/blast"), true, new MockFastaCmd(ad.getPrimaryTaxon()));
assertNotNull(seqs);
assertTrue(!seqs.isEmpty());
Blat mockBlat = new MockBlat(ad.getPrimaryTaxon());
ad = arrayDesignService.thaw(ad);
Collection<BlatResult> blatResults = aligner.processArrayDesign(ad, mockBlat);
assertTrue(blatResults.size() > 200);
}
Aggregations