Skip to content

Commit

Permalink
changed validation stringency flags
Browse files Browse the repository at this point in the history
  • Loading branch information
njdbickhart committed Jan 29, 2015
1 parent ff13372 commit 7a882df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/modes/PreprocessMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void run(){

// Run through the BAM file generating split and divet data
final SAMFileReader reader = new SAMFileReader(new File(input));
reader.setValidationStringency(SAMFileReader.ValidationStringency.LENIENT);
reader.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);

SAMFileHeader h = reader.getFileHeader();
List<BedSimple> coords = this.getSamIntervals(h);
Expand All @@ -90,7 +90,7 @@ public void run(){
SamRecordMatcher w = new SamRecordMatcher(samplimit, checkRG, utilities.GetBaseName.getBaseName(outbase) + ".tmp", values, debug);
try{
SAMFileReader temp = new SAMFileReader(new File(input));
temp.setValidationStringency(SAMFileReader.ValidationStringency.LENIENT);
temp.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);
SAMRecordIterator itr = temp.queryContained(b.Chr(), b.Start(), b.End());
itr.forEachRemaining((k) -> w.bufferedAdd(k));
temp.close();
Expand Down Expand Up @@ -127,7 +127,7 @@ public void run(){
itr.close();*/

SAMFileReader next = new SAMFileReader(new File(input));
next.setValidationStringency(SAMFileReader.ValidationStringency.LENIENT);
next.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);
worker.convertToVariant(divets, splits);
worker.RetrieveMissingAnchors(splits, next.iterator());

Expand Down
3 changes: 2 additions & 1 deletion src/workers/BamMetadataGeneration.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public BamMetadataGeneration(boolean hasRG){
*/
public void ScanFile(String input, int samplimit){
SAMFileReader sam = new SAMFileReader(new File(input));
sam.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);
if(!sam.hasIndex()){
System.out.println("[METADATA] Could not find bam index file. Creating one now...");
BAMIndexer b = new BAMIndexer(new File(input + ".bai"), sam.getFileHeader());
Expand All @@ -63,7 +64,7 @@ public void ScanFile(String input, int samplimit){
System.out.println("[METADATA] Finished with bam index generation.");
sam = new SAMFileReader(new File(input));
}
sam.setValidationStringency(SAMFileReader.ValidationStringency.LENIENT);
//sam.setValidationStringency(SAMFileReader.ValidationStringency.LENIENT);
header = sam.getFileHeader();
if(expectRG){

Expand Down

0 comments on commit 7a882df

Please sign in to comment.