Beagle Conform-gt Java Error
1
0
Entering edit mode
3.8 years ago

Hello,

Can you tell me what this error message means and suggest how to fix it:

Exception in thread "main" java.lang.IllegalArgumentException: duplicate arguments: ref
        at blbutil.Validate.argsToMap(Validate.java:80)
        at conform.ConformPar.<init>(ConformPar.java:43)
        at conform.ConformMain.parameters(ConformMain.java:559)
        at conform.ConformMain.main(ConformMain.java:96)

This came up when trying to run Beagle's Conform-gt script:

for i in {1..23}
do
java -jar ./conform-gt.24May16.cee.jar gt=$OUTDIR/DAC14_send_to_topmed/DAC14_chr$i_hg38.vcf.gz match=ID chrom=$i ref=$OUTDIR/conformgt_HG38_Ref/ALL.chr{{1..22},X}_GRCh38.genotypes.20170504.vcf.gz{,.tbi} out=$OUTDIR/DAC14_send_to_topmed_rpe.correctedstrand/DAC14.chr${i}.corrected.vcf.gz

I am using conform-gt, as suggested by some forums here, because when attempting to run a topmed imputation, I received this a warning message during the QC step:

Excluded sites in total: 249,213
Remaining sites in total: 251,638
See snps-excluded.txt for details
Typed only sites: 31,968
See typed-only.txt for details
Warning: 1 Chunk(s) excluded: < 3 SNPs (see chunks-excluded.txt for details).
Remaining chunk(s): 292
Error: More than 10000 obvious strand flips have been detected. Please check strand. Imputation cannot be started!

Supposedly, Conform-gt can help me with these snpflips, I just cannot get the script to work. Help please!

Beagle Conform-gt Java Imputation topmed • 2.0k views
ADD COMMENT
0
Entering edit mode

Remove the "{,.tbi}" bit at the end of your ref argument. It's expanding to include both the vcf and the index file, so it thinks you are giving it two arguments. you dont need the index file for gtconform, only the vcf.

ADD REPLY
0
Entering edit mode

Thanks, but unfortunately did not work. This is what I ran:

for i in {1..23}
do
java -jar ./conform-gt.24May16.cee.jar gt=$OUTDIR/DAC14_send_to_topmed/DAC14_chr$i_hg38.vcf.gz match=ID chrom=$i ref=$OUTDIR/conformgt_HG38_Ref/ALL.chr{{1..22},X}_GRCh38.genotypes.20170504.vcf.gz out=$OUTDIR/DAC14_send_to_topmed_rpe.correctedstrand/DAC14.chr${i}.corrected.vcf.gz

Same argument came back:

Exception in thread "main" java.lang.IllegalArgumentException: duplicate arguments: ref
        at blbutil.Validate.argsToMap(Validate.java:80)
        at conform.ConformPar.<init>(ConformPar.java:43)
        at conform.ConformMain.parameters(ConformMain.java:559)
        at conform.ConformMain.main(ConformMain.java:96)

might be a stupid question...but should I go in and delete the tbi files from the ref folder?

ADD REPLY
0
Entering edit mode

Are you omitting part of your for loop code when posting? Please use 101010 button in editor window to format code portion of your post. I have done this for you for now.

ADD REPLY
0
Entering edit mode

Not entirely sure what you're asking. But no, other than using these wget codes, I used my for as is:

wget http://bochet.gcc.biostat.washington.edu/beagle/1000_Genomes_phase3_v5a/sample_info/integrated_call_samples_v3.20130502.ALL.panel
wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/supporting/GRCh38_positions/ALL.chr{{1..22},X}_GRCh38.genotypes.20170504.vcf.gz{,.tbi}
wget https://faculty.washington.edu/browning/conform-gt/conform-gt.24May16.cee.jar -O conform-gt.24May16.cee.jar


for i in {1..23}
do
java -jar ./conform-gt.24May16.cee.jar gt=$OUTDIR/DAC14_send_to_topmed/DAC14_chr$i\_hg38.vcf.gz match=ID chrom=$i ref=$OUTDIR/conformgt_HG38_Ref/ALL.chr{{1..22},X}_GRCh38.genotypes.20170504.vcf.gz out=$OUTDIR/DAC14_send_to_topmed_rpe.correctedstrand/DAC14.chr${i}.corrected.vcf.gz
ADD REPLY
0
Entering edit mode

No don't delete them. Change gt=$OUTDIR/DAC14_send_to_topmed/DAC14_chr$i_hg38.vcf.gz to gt=$OUTDIR/DAC14_send_to_topmed/DAC14_chr$i\_hg38.vcf.gz. You need to escape the underscore after the $i or else the shell will try and find the variable $i_hg38 rather than $i and it won't be able to find it. Not sure if this is causing the problem though.

ADD REPLY
0
Entering edit mode

Changed, but still no luck.

Do you know if I have to set some of these parameters before writing the "for..." code? I set the OUTDIR portion, of course, but I couldn't find examples of others who set some parameters specific for the conform-gt scripts. Not sure if this is the issue here...

ADD REPLY
1
Entering edit mode
3.8 years ago
4galaxy77 2.9k

Just realised another problem. Your argument ref=$OUTDIR/conformgt_HG38_Re/ALL.chr{{1..22},X}_GRCh38.genotypes.20170504.vcf.gz expands to 23 files. Change it to ref=$OUTDIR/conformgt_HG38_Ref/ALL.chr$i\_GRCh38.genotypes.20170504.vcf.gz

It's worth taking a while to read the error message. They tell you what the problem is. Here, it's telling you that there are multiple files for the ref argument. Think about why that might be the case..

ADD COMMENT
0
Entering edit mode

It worked. Thank you greatly. I spent hours "googling" what "duplicate arguments ref at..." meant. Makes sense now. Thank you so much!

ADD REPLY

Login before adding your answer.

Traffic: 1882 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