Skip to content

Commit

Permalink
Merge pull request #3 from khillion/master
Browse files Browse the repository at this point in the history
modified help page and samtools_path usage
  • Loading branch information
FelixKrueger authored Oct 7, 2016
2 parents 93d5b81 + b68b982 commit 77286e1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions SNPsplit
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ sub process_masked_BAM_file{

my ($file) = @_;

open (IN,"samtools view -h $file |") or die "Failed to read from BAM file $file: $!\n";
open (IN,"$samtools_path view -h $file |") or die "Failed to read from BAM file $file: $!\n";
warn "Reading from sorted mapping file '$file'\n";
### READING FROM MAPPING BAM FILE

Expand Down Expand Up @@ -1078,7 +1078,7 @@ sub sam2bam_convert{
warn "Now converting '$file' to '$bamfile' ...\n";
sleep (3);

system ("samtools view -bS $file > $bamfile");
system ("$samtools_path view -bS $file > $bamfile");

warn "BAM conversion finished\n\n";
sleep (3);
Expand All @@ -1094,7 +1094,7 @@ sub sort_by_name_paired_end{
$sorted =~ s/bam$/sortedByName.bam/;

warn "Sorting paired-end BAM file '$file' by read IDs ...\n";
system ("samtools sort -n $file -o $sorted");
system ("$samtools_path sort -n $file -o $sorted");

$file = $sorted; # setting sorted BAM file as new $file
warn "Finished sorting BAM file into new file '$file'\n\n";
Expand Down Expand Up @@ -1281,7 +1281,7 @@ sub check_for_bs{
open (DETERMINE,"zcat $file |") or die "Unable to read from gzipped file $file: $!\n";
}
elsif ($file =~ /\.bam$/ ){
open (DETERMINE,"samtools view -h $file |") or die "Unable to read from BAM file $file: $!\n";
open (DETERMINE,"$samtools_path view -h $file |") or die "Unable to read from BAM file $file: $!\n";
}
else{
open (DETERMINE,$file) or die "Unable to read from $file: $!\n";
Expand Down Expand Up @@ -1604,7 +1604,7 @@ The SNPsplit-sort module reads in the tagged BAM file and sorts the reads (or re
tag (or the combination of tags for paired-end or Hi-C reads) into subfiles.
USAGE: SNPsplit_genome_preparation [options] --vcf_file <VCF.file> --genome /path/to/genome/ [input file(s)]
USAGE: SNPsplit [options] --snp_file <SNP.file.gz> [input file(s)]
input file(s) Mapping output file in SAM or BAM format. SAM files (ending in .sam) will first be
Expand Down Expand Up @@ -1641,7 +1641,7 @@ input file(s) Mapping output file in SAM or BAM format. SAM files (endi
automatically. In addition it will perform a quick check to see if a paired-end file appears
to have been positionally sorted, and if not will set the --no_sort flag.
--samtools-path The path to your Samtools installation, e.g. /home/user/samtools/. Does not need to
--samtools_path The path to your Samtools installation, e.g. /home/user/samtools/. Does not need to
be specified explicitly if Samtools is in the PATH already.
--verbose Verbose output (for debugging).
Expand Down

0 comments on commit 77286e1

Please sign in to comment.