diff --git a/tool_conf.xml.sample b/tool_conf.xml.sample index b65ec986b02..9a6ed944c1f 100644 --- a/tool_conf.xml.sample +++ b/tool_conf.xml.sample @@ -169,29 +169,28 @@ -
- - - - - - - - - - - - - - -
-
- - -
-
- - +
+
diff --git a/tools/samtools/pileup_parser.pl b/tools/samtools/pileup_parser.pl index 37b74aa51b7..53f26c1870b 100755 --- a/tools/samtools/pileup_parser.pl +++ b/tools/samtools/pileup_parser.pl @@ -1,6 +1,8 @@ #! /usr/bin/perl -w use strict; +use POSIX; + die "Usage: pileup_parser.pl \n" unless @ARGV == 11; @@ -28,10 +30,12 @@ open (OUT, ">$out_file") or die "Cannot open $out_file $!\n"; while () { chop; + next if m/^\#/; my @fields = split /\t/; next if $fields[ $ref_base_column ] eq "*"; # skip indel lines - next if $fields[ $cvrg_column ] < $cvrg_cutoff; # skip low coverage lines - my $read_bases = $fields[ $read_bases_column ]; + my $read_bases = $fields[ $read_bases_column ]; + die "Coverage column" . ($cvrg_column+1) . " contains non-numeric values. Check your input parameters as well as format of input dataset." if ( not isdigit $fields[ $cvrg_column ] ); + next if $fields[ $cvrg_column ] < $cvrg_cutoff; my $base_quality = $fields[ $base_quality_column ]; if ($read_bases =~ m/[\$\^\+-]/) { @@ -42,11 +46,8 @@ while () { $read_bases =~ s/[\+-]{1}$indel_len.{$indel_len}//; # remove indel info from read base field } } - if ( length($read_bases) != length($base_quality) ) { - - $first_skipped_line = $_ if $invalid_line_counter == 0; - ++$invalid_line_counter; - } + die "Error parsing read bases and qualities in line $.. Last processed line conatined these values: " . join("\t", @fields) . "\n" if ( length($read_bases) != length($base_quality) ); + # after removing read block and indel data the length of read_base # field should identical to the length of base_quality field @@ -95,4 +96,4 @@ while () { print STDERR "Could not parse $invalid_line_counter line(s) beginning with: $first_skipped_line\n" if $invalid_line_counter > 0; close IN; -close OUT; \ No newline at end of file +close OUT; diff --git a/tools/samtools/sam2interval.py b/tools/samtools/sam2interval.py index 59f3450c922..9ec4205d53e 100644 --- a/tools/samtools/sam2interval.py +++ b/tools/samtools/sam2interval.py @@ -78,7 +78,7 @@ options (listed below) default to 'None' if omitted for line in infile: line = line.rstrip( '\r\n' ) - if line and not line.startswith( '#,@' ): + if line and not line.startswith( '#' ) and not line.startswith( '@' ) : fields = line.split( '\t' ) start = int( fields[ int( options.start_col ) - 1 ] ) - 1 end = 0 diff --git a/tools/samtools/sam_bitwise_flag_filter.py b/tools/samtools/sam_bitwise_flag_filter.py index 692180a034b..bb223ebd1ae 100755 --- a/tools/samtools/sam_bitwise_flag_filter.py +++ b/tools/samtools/sam_bitwise_flag_filter.py @@ -135,7 +135,7 @@ options (listed below) default to 'None' if omitted for line in infile: line = line.rstrip( '\r\n' ) - if line and not line.startswith( '#' ): + if line and not line.startswith( '#' ) and not line.startswith( '@' ) : fields = line.split( '\t' ) sam_states = [] sam_states.append( bool( int( fields[ int( options.flag_col ) - 1 ] ) & 0x0001 ) ) diff --git a/tools/sr_mapping/bowtie_wrapper.xml b/tools/sr_mapping/bowtie_wrapper.xml index fed28e165ce..8d9761678f0 100644 --- a/tools/sr_mapping/bowtie_wrapper.xml +++ b/tools/sr_mapping/bowtie_wrapper.xml @@ -336,7 +336,7 @@ - + @@ -443,31 +443,34 @@ Bowtie accepts files in Sanger FASTQ format. The output is in SAM format, and has the following columns:: - 1 QNAME - Query (pair) NAME - 2 FLAG - bitwise FLAG - 3 RNAME - Reference sequence NAME - 4 POS - 1-based leftmost POSition/coordinate of clipped sequence - 5 MAPQ - MAPping Quality (Phred-scaled) - 6 CIGAR - extended CIGAR string - 7 MRNM - Mate Reference sequence NaMe ('=' if same as RNAME) - 8 MPOS - 1-based Mate POSition - 9 ISIZE - Inferred insert SIZE - 10 SEQ - query SEQuence on the same strand as the reference - 11 QUAL - query QUALity (ASCII-33 gives the Phred base quality) - 12 OPT - variable OPTional fields in the format TAG:VTYPE:VALU + Column Description + -------- -------------------------------------------------------- + 1 QNAME Query (pair) NAME + 2 FLAG bitwise FLAG + 3 RNAME Reference sequence NAME + 4 POS 1-based leftmost POSition/coordinate of clipped sequence + 5 MAPQ MAPping Quality (Phred-scaled) + 6 CIGAR extended CIGAR string + 7 MRNM Mate Reference sequence NaMe ('=' if same as RNAME) + 8 MPOS 1-based Mate POSition + 9 ISIZE Inferred insert SIZE + 10 SEQ query SEQuence on the same strand as the reference + 11 QUAL query QUALity (ASCII-33 gives the Phred base quality) + 12 OPT variable OPTional fields in the format TAG:VTYPE:VALUE The flags are as follows:: - Flag - Description - 0x0001 - the read is paired in sequencing - 0x0002 - the read is mapped in a proper pair - 0x0004 - the query sequence itself is unmapped - 0x0008 - the mate is unmapped - 0x0010 - strand of the query (1 for reverse) - 0x0020 - strand of the mate - 0x0040 - the read is the first read in a pair - 0x0080 - the read is the second read in a pair - 0x0100 - the alignment is not primary + Flag Description + ------ ------------------------------------- + 0x0001 the read is paired in sequencing + 0x0002 the read is mapped in a proper pair + 0x0004 the query sequence itself is unmapped + 0x0008 the mate is unmapped + 0x0010 strand of the query (1 for reverse) + 0x0020 strand of the mate + 0x0040 the read is the first read in a pair + 0x0080 the read is the second read in a pair + 0x0100 the alignment is not primary It looks like this (scroll sideways to see the entire example)::