dkoboldt / varscan

Variant calling and somatic mutation/CNV detection for next-generation sequencing data
152 stars 34 forks source link

VarScan copynumber outputName #7

Open mxqian opened 8 years ago

mxqian commented 8 years ago

Code: String outputName = "output";

    if(args.length >= 3 && !args[2].startsWith("-"))
    {
        outputName = args[2];
    }

if using it like that "samtools mpileup -q 1 -f ref.fa normal.bam tumor.bam | java -jar VarScan.jar copynumber $outPrefix --mpileup 1", the "outputName" will always be "output". So, args[2] should be args[1] which refers to "$outPrefix".

But if using it like that "USAGE: java -jar VarScan.jar copynumber [normal-tumor.mpileup] [Opt: output] OPTIONS\n", the args[2] is right.

And if like that "java -jar VarScan.jar copynumber normal.pileup tumor.pileup output.basename", what is going to be? Oh, this one will use the another constructor. Anyway, it's OK.

so, if the program allows the pipe from command line, I think this issue should be fixed.

mxqian commented 8 years ago

Sorry to mention, I checked that in the version 2.4.0 and 2.4.1.

mxqian commented 8 years ago

Well, adding "-" after copynumber seemingly can solve the problem when reading from pipe. Good. So, updating the Recommended Workflow on the website is the only thing.

splaisan commented 6 years ago

Please update the doc and inline help in a newer version than 1.4.3 to include a good example of piping mpilup to the various caller methods. Each command is a pain when trying to pipe the mpileup to varscan not to mention that this is not clearly explained in the -h help nor in the Curr Protoc paper which for the remaining is a very good tutorial. This tool suite rocks but lacks a good up-to-date tutorial.

my understanding would be (thanks to @mxqian)

# the first '-' receives the pipe, the next argument $2 becomes the output prefix
samtools mpileup -B -f ${REFFILE} ${NORMALBAM} ${TUMORBAM} \
    | java -jar varscan.jar somatic - ${OUTFILE} --mpileup 1

I hope this also applies to other modules like 'copynumber' (now trying)