tseemann / samclip

Filter SAM file for soft and hard clipped alignments
GNU General Public License v3.0
46 stars 10 forks source link

samtools sort: failed to read header from "-" (snippy_v4.6 #20

Closed ahadlaique closed 1 year ago

ahadlaique commented 1 year ago

$ snippy --force --outdir SNIPPY_v4.6/pakoutput06 --reference "/mnt/c/Users/aaaha/Desktop/Salmonella Typhi/Pak sequence/Salmonellatyphimuriumlt2.FAS" --R1 "/mnt/c/Users/aaaha/Desktop/Salmonella Typhi/Pak sequence/O2_1.fastq.gz" --R2 "/mnt/c/Users/aaaha/Desktop/Salmonella Typhi/Pak sequence/O2_2.fastq.gz" [08:09:40] This is snippy 4.6.0 [08:09:40] Written by Torsten Seemann [08:09:40] Obtained from https://github.com/tseemann/snippy [08:09:40] Detected operating system: linux [08:09:40] Enabling bundled linux tools. [08:09:40] Found bwa - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/bwa [08:09:40] Found bcftools - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/bcftools [08:09:40] Found samtools - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/samtools [08:09:40] Found java - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/java [08:09:40] Found snpEff - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/snpEff [08:09:40] Found samclip - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/samclip [08:09:40] Found seqtk - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/seqtk [08:09:40] Found parallel - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/parallel [08:09:40] Found freebayes - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/freebayes [08:09:40] Found freebayes-parallel - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/freebayes-parallel [08:09:40] Found fasta_generate_regions.py - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/fasta_generate_regions.py [08:09:40] Found vcfstreamsort - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/vcfstreamsort [08:09:40] Found vcfuniq - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/vcfuniq [08:09:40] Found vcffirstheader - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/vcffirstheader [08:09:40] Found gzip - /usr/bin/gzip [08:09:40] Found vt - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/vt [08:09:40] Found snippy-vcf_to_tab - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/snippy-vcf_to_tab [08:09:40] Found snippy-vcf_report - /home/aaaha/miniconda3/envs/snippy_v4.6/bin/snippy-vcf_report [08:09:40] Checking version: samtools --version is >= 1.7 - ok, have 1.15 [08:09:40] Checking version: bcftools --version is >= 1.7 - ok, have 1.15 [08:09:40] Checking version: freebayes --version is >= 1.1 - ok, have 1.3.6 [08:09:41] Checking version: snpEff -version is >= 4.3 - ok, have 5.1 [08:09:41] Checking version: bwa is >= 0.7.12 - ok, have 0.7.17 [08:09:41] Using reference: /mnt/c/Users/aaaha/Desktop/Salmonella Typhi/Pak sequence/Salmonellatyphimuriumlt2.FAS [08:09:41] Treating reference as 'fasta' format. [08:09:41] Will use 8 CPU cores. [08:09:41] Using read file: /mnt/c/Users/aaaha/Desktop/Salmonella Typhi/Pak sequence/O2_1.fastq.gz [08:09:41] Using read file: /mnt/c/Users/aaaha/Desktop/Salmonella Typhi/Pak sequence/O2_2.fastq.gz [08:09:41] Used --force, will overwrite existing SNIPPY_v4.6/pakoutput06 [08:09:41] Changing working directory: SNIPPY_v4.6/pakoutput06 [08:09:41] Creating reference folder: reference [08:09:41] Extracting FASTA and GFF from reference. [08:09:42] Wrote 1 sequences to ref.fa [08:09:42] Wrote 0 features to ref.gff [08:09:42] Freebayes will process 15 chunks of 329227 bp, 8 chunks at a time. [08:09:42] Using BAM RG (Read Group) ID: pakoutput06 [08:09:42] Running: samtools faidx reference/ref.fa 2>> snps.log [08:09:42] Running: bwa index reference/ref.fa 2>> snps.log [08:09:43] Running: mkdir -p reference/genomes && cp -f reference/ref.fa reference/genomes/ref.fa 2>> snps.log [08:09:43] Running: ln -sf reference/ref.fa . 2>> snps.log [08:09:43] Running: ln -sf reference/ref.fa.fai . 2>> snps.log [08:09:43] Running: mkdir -p reference/ref && gzip -c reference/ref.gff > reference/ref/genes.gff.gz 2>> snps.log [08:09:43] Running: bwa mem -Y -M -R '@RG\tID:pakoutput06\tSM:pakoutput06' -t 8 reference/ref.fa /mnt/c/Users/aaaha/Desktop/Salmonella Typhi/Pak sequence/O2_1.fastq.gz /mnt/c/Users/aaaha/Desktop/Salmonella Typhi/Pak sequence/O2_2.fastq.gz | samclip --max 10 --ref reference/ref.fa.fai | samtools sort -n -l 0 -T /tmp --threads 3 -m 2000M | samtools fixmate -m --threads 3 - - | samtools sort -l 0 -T /tmp --threads 3 -m 2000M | samtools markdup -T /tmp --threads 3 -r -s - - > snps.bam 2>> snps.log

Usage: bwa mem [options] [in2.fq]

Algorithm options:

   -t INT        number of threads [8]
   -k INT        minimum seed length [19]
   -w INT        band width for banded alignment [100]
   -d INT        off-diagonal X-dropoff [100]
   -r FLOAT      look for internal seeds inside a seed longer than {-k} * FLOAT [1.5]
   -y INT        seed occurrence for the 3rd round seeding [20]
   -c INT        skip seeds with more than INT occurrences [500]
   -D FLOAT      drop chains shorter than FLOAT fraction of the longest overlapping chain [0.50]
   -W INT        discard a chain if seeded bases shorter than INT [0]
   -m INT        perform at most INT rounds of mate rescues for each read [50]
   -S            skip mate rescue
   -P            skip pairing; mate rescue performed unless -S also in use

Scoring options:

   -A INT        score for a sequence match, which scales options -TdBOELU unless overridden [1]
   -B INT        penalty for a mismatch [4]
   -O INT[,INT]  gap open penalties for deletions and insertions [6,6]
   -E INT[,INT]  gap extension penalty; a gap of size k cost '{-O} + {-E}*k' [1,1]
   -L INT[,INT]  penalty for 5'- and 3'-end clipping [5,5]
   -U INT        penalty for an unpaired read pair [17]

   -x STR        read type. Setting -x changes multiple parameters unless overridden [null]
                 pacbio: -k17 -W40 -r10 -A1 -B1 -O1 -E1 -L0  (PacBio reads to ref)
                 ont2d: -k14 -W20 -r10 -A1 -B1 -O1 -E1 -L0  (Oxford Nanopore 2D-reads to ref)
                 intractg: -B9 -O16 -L5  (intra-species contigs to ref)

Input/output options:

   -p            smart pairing (ignoring in2.fq)
   -R STR        read group header line such as '@RG\tID:foo\tSM:bar' [null]
   -H STR/FILE   insert STR to header if it starts with @; or insert lines in FILE [null]
   -o FILE       sam file to output results to [stdout]
   -j            treat ALT contigs as part of the primary assembly (i.e. ignore <idxbase>.alt file)
   -5            for split alignment, take the alignment with the smallest coordinate as primary
   -q            don't modify mapQ of supplementary alignments
   -K INT        process INT input bases in each batch regardless of nThreads (for reproducibility) []

   -v INT        verbosity level: 1=error, 2=warning, 3=message, 4+=debugging [3]
   -T INT        minimum score to output [30]
   -h INT[,INT]  if there are <INT hits with score >80% of the max score, output all in XA [5,200]
   -a            output all alignments for SE or unpaired PE
   -C            append FASTA/FASTQ comment to SAM output
   -V            output the reference FASTA header in the XR tag
   -Y            use soft clipping for supplementary alignments
   -M            mark shorter split hits as secondary

   -I FLOAT[,FLOAT[,INT[,INT]]]
                 specify the mean, standard deviation (10% of the mean if absent), max
                 (4 sigma from the mean if absent) and min of the insert size distribution.
                 FR orientation only. [inferred]

Note: Please read the man page for detailed description of the command line and options.

[samclip] samclip 0.4.0 by Torsten Seemann (@torstenseemann) [samclip] Loading: reference/ref.fa.fai [samclip] Found 1 sequences in reference/ref.fa.fai [samclip] Total SAM records 0, removed 0, allowed 0, passed 0 [samclip] Header contained 0 lines [samclip] Done. samtools sort: failed to read header from "-" [bam_mating_core] ERROR: Couldn't read header samtools sort: failed to read header from "-" [08:09:43] Error running command, check SNIPPY_v4.6/pakoutput06/snps.log

ahadlaique commented 1 year ago

Reinstall new version