1
$\begingroup$

I am trying to create a GATK g CNV pipeline and I need to make shards before running the GermlineCNVCaller therefore, I believe I need to use SplitIntervals.

I have the following predefined variables:

  • singularity_image is the path to the GATK sif file
  • bam_file is a bam file from a defined bam directory
  • reference is a path to a .fa file
  • targets_interval_list is a interval list created by Picard (ending with .interval_list)
  • NUM_BINS is a manually preset value from 100 to 200.
  singularity exec $singularity_image /gatk/gatk --java-options -Xms8000m \
  SplitIntervals \
  -I ${bam_file} \
  -R ${reference} \
  -L ${targets_interval_list} \
  --scatter-count ${NUM_BINS} \
  -O ${output_dir}/Interval_list_${bam_filename}_.shard_\%${NUM_BINS}\%_\%{shard_index}\%.interval_list

I have tried change the specifications under SplitIntervals but for whatever reason I keep getting the following error

***********************************************************************

A USER ERROR has occurred: but no positional argument is defined for this tool.

***********************************************************************

Why is this error occurring?

The documentation I am using is here: https://gatk.broadinstitute.org/hc/en-us/articles/360036899592-SplitIntervals

$\endgroup$
5
  • $\begingroup$ What are all the \% in your output file name? Does it work if you try a simple output file name (e.g. -O foo.list)? $\endgroup$
    – terdon
    Apr 24 at 13:13
  • $\begingroup$ I can't as it is being used on multiple files. $\endgroup$
    – Indira
    Apr 24 at 13:14
  • $\begingroup$ It is meant to be used to create an interval list with the numbers Interval_list_SampleNameHere_.shard_1ofn_.interval_list $\endgroup$
    – Indira
    Apr 24 at 13:16
  • 1
    $\begingroup$ Please answer both questions, not just the last one. And even if it is being used on multiple files, try one so you can debug it. That's the way debugging works: you need to try things. Try changing each of the variables you pass to a simple string and see if the error changes. Try and figure out which part of the command is actually causing the error and for that, you will need to run the command by itself. $\endgroup$
    – terdon
    Apr 24 at 13:16
  • $\begingroup$ Thank you for the help I will try with one file - it does seem to be the -O part of the command I will work on it from here and try with perhaps just one file. $\endgroup$
    – Indira
    Apr 24 at 13:33

1 Answer 1

1
$\begingroup$

This solution where the -O is just set to the output directory seems the most easy way to handle the issue:

Keep the following variables the same:

  • singularity_image is the path to the GATK sif file
  • bam_file is a bam file from a defined bam directory
  • reference is a path to a .fa file
  • targets_interval_list is a interval list created by Picard (ending with .interval_list)
  • NUM_BINS is a manually preset value from 100 to 200.

The code with the modified -O:

  # run SplitIntervals with shard name
  singularity exec $singularity_image /gatk/gatk --java-options -Xms8000m \
  SplitIntervals \
  -R ${reference} \
  -L ${targets_interval_list} \
  --scatter-count ${NUM_BINS} \
  -O ${output_dir}

While it doesn't name the shards in a very elegant way it seems to work. The shards are made from the interval list and therefore, should not be named after the .bams that will be processed in other steps that are used (for in this case a GATK g CNV pipeline).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.