Open mxqian opened 8 years ago
Sorry to mention, I checked that in the version 2.4.0 and 2.4.1.
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.
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)
Code: String outputName = "output";
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.