lh3 / minipileup

Simple pileup-based variant caller
79 stars 6 forks source link

Super cool tool! Just noticed though that -y overrides user set values for -a and -s and -q and -Q #2

Closed jelber2 closed 4 months ago

jelber2 commented 5 months ago

At least as of 78d58cf ,

if one uses -y, then the settings for -a and -s are 2 and 5, irrespective of what the user sets -a and -s (and for -q and -Q). I know that I am dumb for not realizing this, but it stumped me for about 20 minutes why ADF and ADR values were too low until I look at pileup.c.

Best, Jean Elbers

lh3 commented 5 months ago

With unix getopt, options specified later in the command line overwrite earlier options. For example, with -y -a3 -a5, the final value of -a will be 5. But with -a3 -a5 -y, the final value will be 2, set by -y.

I can make -y work in a similar manner to -x in minimap2. Another day.

jelber2 commented 5 months ago

Thank you very much. This is certainly not a big issue.

emilydolivo97 commented 4 months ago

How I can install minipileup please ?

QuentinPerriere commented 4 months ago

At least as of 78d58cf ,

if one uses -y, then the settings for -a and -s are 2 and 5, irrespective of what the user sets -a and -s (and for -q and -Q). I know that I am dumb for not realizing this, but it stumped me for about 20 minutes why ADF and ADR values were too low until I look at pileup.c.

Best, Jean Elbers

I don't see a difference in my vcf file when I use -y by default and when I set -a -s -q -Q. each time it's the same ADF and ADR values. this is the command that I'm using :

minipileup -vcC -s1 -q1 -Q1 -a1 -f ref_sequence.fa map_file.bam > variants.vcf

jelber2 commented 4 months ago

At least as of 78d58cf , if one uses -y, then the settings for -a and -s are 2 and 5, irrespective of what the user sets -a and -s (and for -q and -Q). I know that I am dumb for not realizing this, but it stumped me for about 20 minutes why ADF and ADR values were too low until I look at pileup.c. Best, Jean Elbers

I don't see a difference in my vcf file when I use -y by default and when I set -a -s -q -Q. each time it's the same ADF and ADR values. this is the command that I'm using :

minipileup -vcC -s1 -q1 -Q1 -a1 -f ref_sequence.fa map_file.bam > variants.vcf

I definitely saw a difference, but as always, that was on my computer. I am always surprised these days by how different computers respond, but perhaps what you saw is related to @lh3 's answer.

EDIT You should get the same values for ADF ADR, but there should also be more or fewer variants if you stringency is lower or higher.

QuentinPerriere commented 4 months ago

At least as of 78d58cf , if one uses -y, then the settings for -a and -s are 2 and 5, irrespective of what the user sets -a and -s (and for -q and -Q). I know that I am dumb for not realizing this, but it stumped me for about 20 minutes why ADF and ADR values were too low until I look at pileup.c. Best, Jean Elbers

I don't see a difference in my vcf file when I use -y by default and when I set -a -s -q -Q. each time it's the same ADF and ADR values. this is the command that I'm using : minipileup -vcC -s1 -q1 -Q1 -a1 -f ref_sequence.fa map_file.bam > variants.vcf

I definitely saw a difference, but as always, that was on my computer. I am always surprised these days by how different computers respond, but perhaps what you saw is related to @lh3 's answer.

EDIT You should get the same values for ADF ADR, but there should also be more or fewer variants if you stringency is lower or higher.

what I find wird is that I'm getting lower number of reads that I'm supposed to have for a particular variant.

jelber2 commented 4 months ago

Please open as a separate issue with @lh3