andersen-lab / ivar

iVar is a computational package that contains functions broadly useful for viral amplicon-based sequencing.
https://andersen-lab.github.io/ivar/html/
GNU General Public License v3.0
115 stars 39 forks source link

iVar variants weird output #164

Closed sejmodha closed 3 months ago

sejmodha commented 1 year ago

Hi There,

I am using iVar for variant calling on DNA virus genomes and I have noted that in some cases, iVar produces a gvcf-like output whereby most positions of the genome(s) are marked as variants. However, it is not a complete gvcf either as not all positions of the genome are listed in the output file. Is it expected behaviour or a bug? What would be the best solution to fix this weird output and only retain true variants?

I am using ivar variants to call variants and the output TSV is converted to VCF file using the ivar_variants_to_vcf.py script.

VIRUS   23763   .   a   A   .   PASS    .   GT:REF_DP:REF_RV:REF_QUAL:ALT_DP:ALT_RV:ALT_QUAL:ALT_FREQ   1:0:0:0:485:290:43:1
VIRUS   23764   .   g   G   .   PASS    .   GT:REF_DP:REF_RV:REF_QUAL:ALT_DP:ALT_RV:ALT_QUAL:ALT_FREQ   1:0:0:0:485:290:43:1
VIRUS   23765   .   a   A   .   PASS    .   GT:REF_DP:REF_RV:REF_QUAL:ALT_DP:ALT_RV:ALT_QUAL:ALT_FREQ   1:0:0:0:485:290:43:1
VIRUS   23766   .   a   A   .   PASS    .   GT:REF_DP:REF_RV:REF_QUAL:ALT_DP:ALT_RV:ALT_QUAL:ALT_FREQ   1:0:0:0:1204:1184:41:1
VIRUS   23767   .   c   C   .   PASS    .   GT:REF_DP:REF_RV:REF_QUAL:ALT_DP:ALT_RV:ALT_QUAL:ALT_FREQ   1:0:0:0:1204:1184:41:1
VIRUS   23768   .   a   A   .   PASS    .   GT:REF_DP:REF_RV:REF_QUAL:ALT_DP:ALT_RV:ALT_QUAL:ALT_FREQ   1:0:0:0:1204:1184:41:1
VIRUS   23769   .   c   C   .   PASS    .   GT:REF_DP:REF_RV:REF_QUAL:ALT_DP:ALT_RV:ALT_QUAL:ALT_FREQ   1:0:0:0:320:207:41:1

Thanks Sej

cmaceves commented 1 year ago

hi! would you mind sending me a over a snippet of your bam file and the exact command used?

Moslemecoh commented 3 months ago

I have called the variant using iVar. The command is given below: samtools mpileup -aa -A -d 600000 -B -Q 0 -r "$Ref" "$bamfile" | ivar variants -p "${base_name}_vari" -q 20 -t 0.03 -r "$Ref" -g "$gff" But the output in the tsv file did not show anything. How can I solve this problem?

cmaceves commented 3 months ago

is there any way you can either send me (a) a link to a drive containing the bam and reference or (b) a smaller portion of the bam file and reference where you see this issue? you can email it over to caceves@scripps.edu

Moslemecoh commented 3 months ago

is there any way you can either send me (a) a link to a drive containing the bam and reference or (b) a smaller portion of the bam file and reference where you see this issue? you can email it over to caceves@scripps.edu

Hi Chrissy Aceves, I have solved the problem and got the result of variant. Thank you.

cmaceves commented 3 months ago

awesome, thanks for posting. will close the issue!