This is a test version of Biostars. For the public version, visit https://www.biostars.org.
VarDictJava - teststrandbias.R

Hi all,

I am trying to optimise my use of VarDictJava for some FFPE sequenced samples with a custom targeted panel. So, I release the following code for implementation:

bashArguments = "/apps/VARDICTJAVA/1.8.3/bin/VarDict -G "+refGenome+" -f 0.001 -N "+sample+" -b "+cleanBqsrBam+" -c 1 -S 2 -E 3 -g 4 "+targetBedFile+" | teststrandbias.R | var2vcf_valid.pl -N "+sample+" -E -f 0.001 > vars.vcf"

Even so, it doesn't detect neither teststrandbias.R, nor var2vcf_valid.pl, which in theory, are inside the /bin/VarDict folder. I'm working from a server and I don't know how to fix it.

Also, if you think I should change any of the arguments to optimise the search for variants in paraffin samples that are not of high quality, any advice would be welcome!

Thanks in advance to all of you!

variant-calling mutation python

What does the following mean?

So, I release the following code for implementation

How is bashArguments being used?

I am using it by using sbatch, and calling the .py script it contains:

import subprocess
import argparse
import time
import sys

if __name__== "__main__":

parser  = argparse.ArgumentParser(description = "VarDictJava")

    parser.add_argument('-o', '--outDir',
                        dest = "outDir",
                        action = "store",
                        required=True,
                        help = "Path to out Working Directory.")

    parser.add_argument('-cleanBqsrBam', '--cleanBqsrBam',
                                            dest = "cleanBqsrBam",
                                            action = "store",
                                            help = "bam")

    parser.add_argument('-refGenome', '--refGenome',
                                            dest = "refGenome",
                                            action = "store",
                                            help = "refGenome")

    parser.add_argument('-targetBedFile', '--targetBedFile',
                                            dest = "targetBedFile",
                                            action = "store",
                                            help = "samtoolsPath")

    parser.add_argument('-sample', '--sample',
                                            dest = "sample",
                                            action = "store",
                                            help = "sample name")

    parser.add_argument('-cpus', '--cpus',
                                            dest = "cpus",
                                            action = "store",
                                            help = "cpus")
    options = parser.parse_args()

    cleanBqsrBam = options.cleanBqsrBam
    refGenome = options.refGenome
    outDir = options.outDir
    targetBedFile = options.targetBedFile
    sample = options.sample
    cpus = options.cpus
    start_time = time.time()


    LOG_FILE_OUT = open(outDir+"/error_VARDICT/logout_VARDICT_"+sample+".txt", 'w')

    LOG_FILE_ERR = open(outDir+"/error_VARDICT/logerr_VARDICT_"+sample+".txt", 'w')

    bashArguments = "/apps/VARDICTJAVA/1.8.3/bin/VarDict -G "+refGenome+" -f 0.001 -N "+sample+" -b "+cleanBqsrBam+" -c 1 -S 2 -E 3 -g 4 "+targetBedFile+" | teststrandbias.R | var2vcf_valid.pl -N "+sample+" -E -f 0.001  > vars.vcf"

But even so, it does not detect the .R or the .pl I try to call when I use the basharguments. In the /apps/VARDICTJAVA/1.8.3/bin> folder, there is only: VarDict VarDict.bat.

0 answers

No answers yet.

Log in to answer this question.