Merge branch 'master' of ssh://nickel.broadinstitute.org/humgen/gsa-scr1/gsa-engineering/git/unstable
This commit is contained in:
commit
784fb148b9
|
|
@ -1,5 +1,6 @@
|
|||
package org.broadinstitute.sting.gatk.refdata.features.refseq;
|
||||
|
||||
import org.apache.commons.io.filefilter.FalseFileFilter;
|
||||
import org.broad.tribble.Feature;
|
||||
import org.broad.tribble.TribbleException;
|
||||
import org.broad.tribble.readers.LineReader;
|
||||
|
|
@ -20,7 +21,7 @@ public class RefSeqCodec implements ReferenceDependentFeatureCodec<RefSeqFeature
|
|||
* The parser to use when resolving genome-wide locations.
|
||||
*/
|
||||
private GenomeLocParser genomeLocParser;
|
||||
|
||||
private boolean zero_coding_length_user_warned = false;
|
||||
/**
|
||||
* Set the parser to use when resolving genetic data.
|
||||
* @param genomeLocParser The supplied parser.
|
||||
|
|
@ -60,9 +61,20 @@ public class RefSeqCodec implements ReferenceDependentFeatureCodec<RefSeqFeature
|
|||
else if ( fields[3].length()==1 && fields[3].charAt(0)=='-') feature.setStrand(-1);
|
||||
else throw new UserException.MalformedFile("Expected strand symbol (+/-), found: "+fields[3] + " for line=" + line);
|
||||
|
||||
int coding_start = Integer.parseInt(fields[6])+1;
|
||||
int coding_stop = Integer.parseInt(fields[7]);
|
||||
|
||||
if ( coding_start > coding_stop ) {
|
||||
if ( ! zero_coding_length_user_warned ) {
|
||||
Utils.warnUser("RefSeq file contains transcripts with zero coding length. "+
|
||||
"Such transcripts will be ignored (this warning is printed only once)");
|
||||
zero_coding_length_user_warned = true;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
feature.setTranscript_interval(genomeLocParser.createGenomeLoc(contig_name, Integer.parseInt(fields[4])+1, Integer.parseInt(fields[5])));
|
||||
feature.setTranscript_coding_interval(genomeLocParser.createGenomeLoc(contig_name, Integer.parseInt(fields[6])+1, Integer.parseInt(fields[7])));
|
||||
feature.setTranscript_coding_interval(genomeLocParser.createGenomeLoc(contig_name, coding_start, coding_stop));
|
||||
feature.setGene_name(fields[12]);
|
||||
String[] exon_starts = fields[9].split(",");
|
||||
String[] exon_stops = fields[10].split(",");
|
||||
|
|
|
|||
|
|
@ -469,10 +469,20 @@ public class SomaticIndelDetectorWalker extends ReadWalker<Integer,Integer> {
|
|||
// let's double check now that the read fits after the shift
|
||||
if ( read.getAlignmentEnd() > normal_context.getStop()) {
|
||||
// ooops, looks like the read does not fit into the window even after the latter was shifted!!
|
||||
throw new UserException.BadArgumentValue("window_size", "Read "+read.getReadName()+": out of coverage window bounds. Probably window is too small, so increase the value of the window_size argument.\n"+
|
||||
"Read length="+read.getReadLength()+"; cigar="+read.getCigarString()+"; start="+
|
||||
// we used to die over such reads and require user to run with larger window size. Now we
|
||||
// just print a warning and discard the read (this means that our counts can be slightly off in
|
||||
// th epresence of such reads)
|
||||
//throw new UserException.BadArgumentValue("window_size", "Read "+read.getReadName()+": out of coverage window bounds. Probably window is too small, so increase the value of the window_size argument.\n"+
|
||||
// "Read length="+read.getReadLength()+"; cigar="+read.getCigarString()+"; start="+
|
||||
// read.getAlignmentStart()+"; end="+read.getAlignmentEnd()+
|
||||
// "; window start (after trying to accomodate the read)="+normal_context.getStart()+"; window end="+normal_context.getStop());
|
||||
System.out.println("WARNING: Read "+read.getReadName()+
|
||||
" is out of coverage window bounds. Probably window is too small and the window_size value must be increased.\n"+
|
||||
" The read is ignored in this run (so all the counts/statistics reported will not include it).\n"+
|
||||
" Read length="+read.getReadLength()+"; cigar="+read.getCigarString()+"; start="+
|
||||
read.getAlignmentStart()+"; end="+read.getAlignmentEnd()+
|
||||
"; window start (after trying to accomodate the read)="+normal_context.getStart()+"; window end="+normal_context.getStop());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue