snippy icon indicating copy to clipboard operation
snippy copied to clipboard

cann't get the result of snps.filt.vcf and snps.vcf

Open richfubo opened this issue 3 years ago • 1 comments

hi: when I use snippy now , I only can get the result of snps.raw.vcf, The result of snps.filt.vcf shows only the table's title.The snps.log is as follows:

echo snippy 4.6.0

cd /disk1/cau/cvmfbx

/disk1/cau/cvmfbx/miniconda3/bin/snippy --cpus 16 --ref /disk1/cau/cvmfbx/sct_modle/genemates/cgsnp/tmexCD_pos_my_158+ncbi_17/GCF_000240185.1_ASM24018v2_genomic.fasta --ctgs /disk1/cau/cvmfbx/sct_modle/genemates/cgsnp/tmexCD_pos_my_158+ncbi_17/16MN2.fasta --outdir /disk1/cau/cvmfbx/sct_modle/genemates/cgsnp/snippy/16MN2.fasta_tab

samtools faidx reference/ref.fa

bwa index reference/ref.fa

[bwa_index] Pack FASTA... 0.03 sec [bwa_index] Construct BWT for the packed sequence... [bwa_index] 1.03 seconds elapse. [bwa_index] Update BWT... 0.02 sec [bwa_index] Pack forward-only FASTA... 0.02 sec [bwa_index] Construct SA from BWT and Occ... 0.51 sec [main] Version: 0.7.17-r1188 [main] CMD: bwa index reference/ref.fa [main] Real time: 1.654 sec; CPU: 1.617 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:16MN2.fasta_tab\tSM:16MN2.fasta_tab' -t 16 reference/ref.fa fake_reads.fq | samclip --max 10 --ref reference/ref.fa.fai | samtools sort -n -l 0 -T /tmp/61836.1.all.q --threads 7 -m 1000M | samtools fixmate -m --threads 7 - - | samtools sort -l 0 -T /tmp/61836.1.all.q --threads 7 -m 1000M | samtools markdup -T /tmp/61836.1.all.q --threads 7 -r -s - - > snps.bam

[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/61836.1.all.q --threads 7 -r -s - - READ: 452928 WRITTEN: 449688 EXCLUDED: 71104 EXAMINED: 381824 PAIRED: 0 SINGLE: 381824 DUPLICATE PAIR: 0 DUPLICATE SINGLE: 3240 DUPLICATE PAIR OPTICAL: 0 DUPLICATE SINGLE OPTICAL: 0 DUPLICATE NON PRIMARY: 0 DUPLICATE NON PRIMARY OPTICAL: 0 DUPLICATE PRIMARY TOTAL: 3240 DUPLICATE TOTAL: 3240 ESTIMATED_LIBRARY_SIZE: 0

samtools index snps.bam

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

freebayes-parallel reference/ref.txt 16 -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

bcftools view --include 'FMT/GT="1/1" && QUAL>=100 && FMT/DP>=10 && (FMT/AO)/(FMT/DP)>=0' snps.raw.vcf | vt normalize -r reference/ref.fa - | bcftools annotate --remove '^INFO/TYPE,^INFO/DP,^INFO/RO,^INFO/AO,^INFO/AB,^FORMAT/GT,^FORMAT/DP,^FORMAT/RO,^FORMAT/AO,^FORMAT/QR,^FORMAT/QA,^FORMAT/GL' > snps.filt.vcf

[E::vcf_parse_format] FORMAT column with no sample columns starting at NC_016845.1:13582

cp snps.filt.vcf snps.vcf

/disk1/cau/cvmfbx/miniconda3/bin/snippy-vcf_to_tab --gff reference/ref.gff --ref reference/ref.fa --vcf snps.vcf > snps.tab

Loading reference: reference/ref.fa Loaded 7 sequences. Loading features: reference/ref.gff Parsing variants: snps.vcf Converted 41 SNPs to TAB format.

/disk1/cau/cvmfbx/miniconda3/bin/snippy-vcf_extract_subs snps.filt.vcf > snps.subs.vcf

bcftools convert -Oz -o snps.vcf.gz snps.vcf

bcftools index -f snps.vcf.gz

bcftools consensus --sample 16MN2.fasta_tab -f reference/ref.fa -o snps.consensus.fa snps.vcf.gz

Applied 41 variants

bcftools convert -Oz -o snps.subs.vcf.gz snps.subs.vcf

bcftools index -f snps.subs.vcf.gz

bcftools consensus --sample 16MN2.fasta_tab -f reference/ref.fa -o snps.consensus.subs.fa snps.subs.vcf.gz

Applied 41 variants

rm -f snps.subs.vcf.gz snps.subs.vcf.gz.csi snps.subs.vcf.gz.tbi

rm -f fake_reads.fq

richfubo avatar Aug 23 '20 17:08 richfubo

Also observe this with conda install of 4.6.0 in unix. Command: snippy --cpus 16 --prefix ${b}_snps --outdir ${out}/${b}_snpy --ref ${ref} --R1 ${R1} --R2 ${R2} --fbopt '--report-monomorphic'

bigdoyle avatar Nov 09 '20 18:11 bigdoyle