Extended event pileups are more verbose now: following a sequence of 'D','I', and '.' symbols, actual distinct events are listed along with their counts (example: +AAA:3,+AAC:1 for the total of 4 indel observations with 3 reads showing +AAA and one read showing +AAC)

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2480 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
asivache 2009-12-29 22:44:18 +00:00
parent 8330058216
commit c928347c0c
1 changed files with 9 additions and 1 deletions

View File

@ -33,8 +33,10 @@ import org.broadinstitute.sting.utils.cmdLine.Argument;
import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
import org.broadinstitute.sting.utils.pileup.ReadBackedExtendedEventPileup;
import org.broadinstitute.sting.utils.Utils;
import org.broadinstitute.sting.utils.Pair;
import java.util.ArrayList;
import java.util.List;
/**
* Prints the alignment in the pileup format. In the pileup format, each line represents a genomic position,
@ -89,7 +91,13 @@ public class PileupWalker extends LocusWalker<Integer, Integer> implements TreeR
if ( context.hasExtendedEventPileup() ) {
ReadBackedExtendedEventPileup indelPileup = context.getExtendedEventPileup();
out.printf("%s %s%n", indelPileup.getShortPileupString(), rods);
List<Pair<String,Integer>> eventCounts = indelPileup.getEventStringsWithCounts();
out.printf("%s %s ", indelPileup.getShortPileupString(), rods);
int i = 0;
for ( ; i < eventCounts.size() - 1 ; i++ ) {
out.printf("%s:%d,",eventCounts.get(i).first,eventCounts.get(i).second);
}
out.printf("%s:%d%n",eventCounts.get(i).first,eventCounts.get(i).second);
}
return 1;
}