use of gov.nih.nlm.ncbi.blast.BlastOutputIterations in project jvarkit by lindenb.
the class BlastMapAnnotations method printUniprot.
private void printUniprot(Uniprot uniprotSet) {
if (uniprotSet.getEntry().isEmpty()) {
LOG.warn("empty uniprot entry.");
return;
}
if (uniprotSet.getEntry().size() > 1) {
LOG.warn("entry contains more than one sequence.");
}
for (Entry entry : uniprotSet.getEntry()) {
BlastOutputIterations iterations = this.blastOutput.getBlastOutputIterations();
for (Iteration iteration : iterations.getIteration()) {
for (FeatureType feature : entry.getFeature()) {
if (!acceptfeature(feature.getType()))
continue;
for (Hit hit : iteration.getIterationHits().getHit()) {
for (Hsp hsp : hit.getHitHsps().getHsp()) {
UniprotInterval bi = new UniprotInterval();
bi.entry = entry;
bi.featureType = feature;
bi.hit = hit;
bi.hsp = hsp;
LOG.debug("interval " + bi);
if (!bi.isFeatureOverlapHsp()) {
continue;
}
stdout().println(bi.toBedString());
}
}
}
break;
}
break;
}
// System.err.println("OK");
}
use of gov.nih.nlm.ncbi.blast.BlastOutputIterations in project jvarkit by lindenb.
the class BlastMapAnnotations method printGB.
private void printGB(GBSet gbSet) {
for (GBSeq gbSeq : gbSet.getGBSeq()) {
BlastOutputIterations iterations = this.blastOutput.getBlastOutputIterations();
for (Iteration iteration : iterations.getIteration()) {
for (GBFeature feature : gbSeq.getGBSeqFeatureTable().getGBFeature()) {
if (feature.getGBFeatureIntervals() == null)
continue;
if (!acceptfeature(feature.getGBFeatureKey()))
continue;
for (GBInterval interval : feature.getGBFeatureIntervals().getGBInterval()) {
for (Hit hit : iteration.getIterationHits().getHit()) {
for (Hsp hsp : hit.getHitHsps().getHsp()) {
GenbankInterval bi = new GenbankInterval();
bi.gbSeq = gbSeq;
bi.gbFeature = feature;
bi.gbInterval = interval;
bi.hit = hit;
bi.hsp = hsp;
LOG.debug("interval " + bi);
if (!bi.isGbForward())
LOG.info("CHECK INTERVAL REVERSE");
if (!bi.isFeatureOverlapHsp())
continue;
stdout().println(bi.toBedString());
}
}
}
}
break;
}
}
// System.err.println("OK");
}
Aggregations