RNA-SeQC gatkFlags option reading first word only
0
0
Entering edit mode
7.0 years ago

I have this issue: when I try to test RNA-SeQC using GATK's multi-threading I'm not seeing the entire gatkFlags string being read:

java -jar $HOME/ngs/software/RNA-SeQC_v1.1.8.jar \
-strictMode \
-o $RNASEQC_FOLDER \
-r $REFERENCE_FASTA \
-t $REFERENCE_TRANSCRIPTOMIC \
-s $RNASEQC_FOLDER/$SAMPLE.bams.txt \
-gatkFlags "--num_threads $THREADS"
Picked up _JAVA_OPTIONS: -Xmx1g
RNA-SeQC v1.1.8.1 07/11/14
Additional GATK flags provided: --num_threads

considering that only the first word of the string was being read then I thought that I could use -nt$THREADS, but the -n even inside the string's quotation marks seems to do something unexpected, hence an error is thrown out:

java -jar $HOME/ngs/software/RNA-SeQC_v1.1.8.jar \
-strictMode \
-o $RNASEQC_FOLDER \
-r $REFERENCE_FASTA \
-t $REFERENCE_TRANSCRIPTOMIC \
-s $RNASEQC_FOLDER/$SAMPLE.bams.txt \
-gatkFlags "-nt$THREADS"
Picked up _JAVA_OPTIONS: -Xmx1g
RNA-SeQC v1.1.8.1 07/11/14
org.apache.commons.cli.MissingArgumentException: Missing argument for option: gatkFlags

any ideas about how to override this anoying behaviour?

EDIT: just solved this issue and confirmed that the gatkFlags does accept any GATK options in a string, but not all the walkers do accept all those options. for the record, multithreading is not supported:

The analysis IntronicExpressionReadBlock currently does not support parallel execution.  Please run your analysis without the -nt option.
RNA-Seq RNA-SeQC gatkFlags • 2.3k views
ADD COMMENT
1
Entering edit mode

Hi Jorge, there seems to be something weird happening. I ran the same version of RNASeqC on commandline as yours , and it picked up the number of threads correctly. My actual command line is this

java8 -jar ~/bin/RNA-SeQC_v1.1.8.jar -strictMode -o tmp_out   -gatkFlags "--num_threads $THREADS" -s "test|CTRL1_S1_Aligned.sortedByCoord.out.bam|testNote"  -t trans.gtf -r /data/db/genomes/hg19.fa

and info message from RNAseqC was this

RNA-SeQC v1.1.8.1 07/11/14
Additional GATK flags provided: --num_threads 5

I had different error in running the prog, but at least it is picking the num of threads right. Are you sure that the THREADS variable is correctly set?

ADD REPLY
0
Entering edit mode

it seems to be a problem with my java calling script. I also use aliases for java7 and java8, although I didn't include them in the original question. it works fine when calling java directly and not through the aliases, so I'll have to correct my aliases for the future. thanks anyway ;)

by the way, RNA-SeQC is based on GATK code, which was supposed to work with java7. java8 compatibility was added at GATK v3.6, but RNA-SeQC is older.

ADD REPLY
0
Entering edit mode

Happy that it is resolved. Shell is very weird and tricky sometimes!

ADD REPLY
0
Entering edit mode

Are you running the command from inside a file? Does it run fine when you run it on command line directly? Note when you run from inside a file, the shell will remove the double quotes before the rnaseqc program has any chance to parse it. So you would need to protect the quotes by adding backslashes (\). ps: your 2nd example seems to be the same as first?!

ADD REPLY
0
Entering edit mode

I've run it both from a script and manually, both with single and double quotation marks, both using a variable $THREADS and a fixed value. no success.

I've edited the second example, since it was a copy-paste problem. I first tried using the large '--num_threads' option and then I also tried the shorter '-nt' option. no success too.

ADD REPLY
0
Entering edit mode

Try adding backslashes before both of the quotes (and first try on command line). Single quotes wont work at all because the $THREADS variable will never get expanded inside single quotes. Ps: am not sure gatk engine parses command like options like shell. So if you say -nt$THREADS, and if $THREADS is 4, the gatk will read it as -nt4 (without space) and might look for an option called -nt4, which obviously doesn't exist.

ADD REPLY
0
Entering edit mode

I tried both escaping and not escaping the quotes with no success. I even found out that the gatkFlags option even accepts a string (well, a single word) even without being quoted. but nothing gets recognized after the first word.

ADD REPLY

Login before adding your answer.

Traffic: 2616 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6