Open gkarthik opened 4 years ago
@svarona wrote a simple Python script to do this for the nf-core/viralrecon pipeline if its useful @gkarthik.
Hi, for deletions ivar is outputting, for a reference having ACGT and a read having a deletion of CGT:
REF ALT A -CGT
And general VCF format is:
REF ALT ACGT A
So in your python script you should do something like:
ref = line[2]
alt = line[3]
if alt[0] == "-":
ref += alt[1:]
alt = line[2]
Paul
Thanks @paulstretenowich Ill fix that 👍
Having looked at this properly now @paulstretenowich it appears that there was a bug in the way insertions were being reported too as fixed here
You are right @drpatelh I did just a naive fix on a specific case I was facing but I suspected other cases. Thanks 👍
I ran a few of iVar's franken-VCF files (from the Cecret workflow) through the vcfR package, but not all of the expected graphs showed up when I generated a chromR object and plotted it. On the iVar end, it would be nice to have the MQ
and QUAL
fields. (The DP
field seems to already be present, however it isn't used for some reason.)
I have included the following instructions for retracing my steps (some of this is aimed more towards the people coming from the vcfR repo):
Here's the chromR plot (window size 500, notice that 3 out of the 4 plots are missing, compared to the first plot found on this page):
Here's the chromoqc plot (window size 500, the low number of variants per site is normal for this sample; however, the top three plots are missing, compared to the last plot found on this page):
Filter variants across replicates with iVar The following is the command for filter variants: ivar filtervariants -t 0.5 -p test.filtered P1_S1.tsv P2_S2.tsv P3_S3.tsv
But always encountering the error message below. Header format of P1_S1.tsv did not match! Please use files generated using "ivar variants" command
I have double checked the header format of those file which do not have any change. Even though, I have changed tsv to txt file. What could be the problem and solution to resolve this issue.
Hi @Moslemecoh! Thanks for bringing this up - I think the better place for this conversation is #178. If you could redirect there, and possibly share the files from the command I can take a look.
ivar variants
outputs results only in custom.tsv
format so unusable with other tools.Allow option to export variants in VCF v4.3 format.