snippy icon indicating copy to clipboard operation
snippy copied to clipboard

Unable to calculate estimated library size: samtools markdup

Open Shyamili09 opened this issue 2 months ago • 0 comments

This is my command: snippy --outdir snps_output_rep4 --ref GCA_018093105.1_ASM1809310v1_genomic.fna --ctgs S.aureus_bat3_r3..contigs.fasta

I am getting error while running samtools markdup I am using contigs and ref genome in fasta format. PLease help me.

########################################

echo snippy 4.6.0

cd /home/ccmb/LV_data/batch5/barcode15/phylogeny/S.aureus/ST_new/ST_new

/home/ccmb/miniconda3/envs/snippy/bin/snippy --outdir snps_output_repfas --ref GCA_018093105.1_ASM1809310v1_genomic.fna --ctgs S.aureus_bat3_r3..contigs.fasta

samtools faidx reference/ref.fa

bwa index reference/ref.fa

[bwa_index] Pack FASTA... 0.02 sec [bwa_index] Construct BWT for the packed sequence... [bwa_index] 0.43 seconds elapse. [bwa_index] Update BWT... 0.01 sec [bwa_index] Pack forward-only FASTA... 0.01 sec [bwa_index] Construct SA from BWT and Occ... 0.19 sec [main] Version: 0.7.18-r1243-dirty [main] CMD: bwa index reference/ref.fa [main] Real time: 0.746 sec; CPU: 0.653 sec

mkdir -p reference/genomes && cp -f reference/ref.fa reference/genomes/ref.fa

ln -sf reference/ref.fa .

ln -sf reference/ref.fa.fai .

mkdir -p reference/ref && gzip -c reference/ref.gff > reference/ref/genes.gff.gz

bwa mem -Y -M -R '@RG\tID:snps_output_repfas\tSM:snps_output_repfas' -t 8 reference/ref.fa fake_reads.fq | 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

samtools markdup: warning, unable to calculate estimated library size. Read pairs 0 should be greater than duplicate pairs 0, which should both be non zero.

COMMAND: samtools markdup -T /tmp --threads 3 -r -s - - READ: 427117 WRITTEN: 416369 EXCLUDED: 103931 EXAMINED: 323186 PAIRED: 0 SINGLE: 323186 DUPLICATE PAIR: 0 DUPLICATE SINGLE: 10748 DUPLICATE PAIR OPTICAL: 0 DUPLICATE SINGLE OPTICAL: 0 DUPLICATE NON PRIMARY: 0 DUPLICATE NON PRIMARY OPTICAL: 0 DUPLICATE PRIMARY TOTAL: 10748 DUPLICATE TOTAL: 10748 ESTIMATED_LIBRARY_SIZE: 0

samtools index snps.bam

fasta_generate_regions.py reference/ref.fa.fai 186841 > reference/ref.txt

freebayes-parallel reference/ref.txt 8 -p 2 -P 0 -C 2 -F 0.05 --min-coverage 10 --min-repeat-entropy 1.0 -q 13 -m 60 --strict-vcf -f reference/ref.fa snps.bam > snps.raw.vcf

Shyamili09 avatar Apr 16 '24 05:04 Shyamili09