Griffan / VerifyBamID

VerifyBamID2: A robust tool for DNA contamination estimation from sequence reads using ancestry-agnostic method.
http://griffan.github.io/VerifyBamID/
92 stars 15 forks source link

bug: --SVDPrefix required when --REFVCF supplied #44

Closed manifestoso closed 1 year ago

manifestoso commented 1 year ago

It seems like a flag parsing bug with verifybamid2 from bioconda where

  verifybamid2 \
      --NumThread 2 \
      --BamFile test.paired_end.sorted.bam \
      --REFVCF test.genome.vcf \
      --Reference genome.fasta  \
      --DisableSanityCheck 

OR

  verifybamid2 \
      --REFVCF test.genome.vcf \
      --Reference genome.fasta  

both complains --SVDPrefix missing as verbose shown

Available Options
                    Input/Output Files : --BamFile [Empty],
                                         --PileupFile [Empty],
                                         --Reference [Empty],
                                         --SVDPrefix [/data/apps/miniconda3/envs/bio/share/verifybamid2-2.0.1-7/resource/--REFVCF.test.genome.vcf.--Reference.vcf.gz.dat],
                                         --Output [result]
               Model Selection Options : --WithinAncestry,
                                         --DisableSanityCheck, --NumPC [2],
                                         --FixPC [Empty],
                                         --FixAlpha [-1.0e+00],
                                         --KnownAF [Empty], --NumThread [4],
                                         --Seed [12345], --Epsilon [1.0e-08],
                                         --OutputPileup, --Verbose
   Construction of SVD Auxiliary Files : --RefVCF [Empty]
                        Pileup Options : --min-BQ [13], --min-MQ [2],
                                         --adjust-MQ [40], --max-depth [8000],
                                         --no-orphans, --incl-flags [1040],
                                         --excl-flags [1796]
                    Deprecated Options : --UDPath [Empty], --MeanPath [Empty],
                                         --BedPath [Empty]
manifestoso commented 1 year ago

TBC

manifestoso commented 1 year ago

The above was due to --RefVCF type, however legacy --UDPath seems to have this parsing problem:

verifybamid2 
--UDPath test.genome.vcf.UD \
--MeanPath test.genome.vcf.mu \
--BedPath test.genome.vcf.bed \
--Reference genome.fasta \
--BamFile test.paired_end.sorted.bam 

Verbose as

                    Input/Output Files : --BamFile [test.paired_end.sorted.bam],
                                         --PileupFile [Empty],
                                         --Reference [genome.fasta],
                                         --SVDPrefix [/data/apps/miniconda3/envs/bio/share/verifybamid2-2.0.1-7/resource/--UDPath.test.genome.vcf.UD.--MeanPath.vcf.gz.dat],
                                         --Output [result]
               Model Selection Options : --WithinAncestry,
                                         --DisableSanityCheck, --NumPC [2],
                                         --FixPC [Empty],
                                         --FixAlpha [-1.0e+00],
                                         --KnownAF [Empty], --NumThread [4],
                                         --Seed [12345], --Epsilon [1.0e-08],
                                         --OutputPileup, --Verbose
   Construction of SVD Auxiliary Files : --RefVCF [Empty]
                        Pileup Options : --min-BQ [13], --min-MQ [2],
                                         --adjust-MQ [40], --max-depth [8000],
                                         --no-orphans, --incl-flags [1040],
                                         --excl-flags [1796]
                    Deprecated Options : --UDPath [Empty], --MeanPath [Empty],
                                         --BedPath [test.genome.vcf.bed]
Griffan commented 1 year ago

@manifestoso Does "—SVDPrefix" work for your case?

manifestoso commented 1 year ago

Thx @Griffan --SVDPrefix can be used if forced, however, we tend to have bed file naming a bit differently due to compliance. Is that --SVDPrefix will be the only flag and the reference stack will be forced to share a parental name going forward, or there is some appetite to investigate the sticking flag issue?

Griffan commented 1 year ago

Is it possible to create a symbolic link to circumvent this issue? It's easy to mess up the marker order among those three files if you change any one of them since they are the results of the SVD process. The reference and RefVCF will be independent of the —SVDPrefix option.

manifestoso commented 1 year ago

Does the order input flags need to be --UDPath --MeanPath --BedPath, but symlink seems a walk-around.

Griffan commented 1 year ago

Not, it doesn't. But whenever —SVDPrefix is available, it's strongly recommended.

manifestoso commented 1 year ago

Thx @Griffan.