Merge branch 'master' of ssh://gsa2.broadinstitute.org/humgen/gsa-scr1/gsa-engineering/git/unstable
This commit is contained in:
commit
81d5eca975
|
|
@ -245,7 +245,7 @@ public class FastaSequenceIndexBuilder {
|
||||||
* Reset iterators and add contig to sequence index
|
* Reset iterators and add contig to sequence index
|
||||||
*/
|
*/
|
||||||
private void finishReadingContig(FastaSequenceIndex sequenceIndex) {
|
private void finishReadingContig(FastaSequenceIndex sequenceIndex) {
|
||||||
sequenceIndex.add(new FastaSequenceIndexEntry(contig, location, size, (int) basesPerLine, (int) bytesPerLine, thisSequenceIndex++));
|
sequenceIndex.add(new FastaSequenceIndexEntry(trimContigName(contig), location, size, (int) basesPerLine, (int) bytesPerLine, thisSequenceIndex++));
|
||||||
status = Status.NONE;
|
status = Status.NONE;
|
||||||
contig = "";
|
contig = "";
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
@ -258,6 +258,14 @@ public class FastaSequenceIndexBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Trims the contig name to the expected value by removing any characters after the first whitespace
|
||||||
|
*/
|
||||||
|
private static String trimContigName(final String contigName) {
|
||||||
|
int whitespaceIndex = contigName.indexOf(' ');
|
||||||
|
return ( whitespaceIndex == -1 ) ? contigName : contigName.substring(0, whitespaceIndex);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores FastaSequenceIndex as a .fasta.fai file on local machine
|
* Stores FastaSequenceIndex as a .fasta.fai file on local machine
|
||||||
* Although method is public it cannot be called on any old FastaSequenceIndex - must be created by a FastaSequenceIndexBuilder
|
* Although method is public it cannot be called on any old FastaSequenceIndex - must be created by a FastaSequenceIndexBuilder
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue