nygenome / Conpair

Concordance and contamination estimator for tumor–normal pairs
Other
56 stars 29 forks source link

Support GATK 4 #11

Open vladsavelyev opened 6 years ago

vladsavelyev commented 6 years ago

Hi,

Thank you for an awesome tool. Great that have a replacement for Contest and VerifyBAMID.

My question is whether you had a chance to test it with GATK 4. GATK4 has a different command line interface, in particular -T Pileup goes into just Pileup, -o translates into capital -O, and read filter flags are a bit renamed and set with -RF. So the Pileup calling code could look like the following:

if gatk_type == "gatk4":
    command_line = ("{7} {0} -Xmx{1} -jar {2} Pileup -R {3} -I {4} -L {5} -O {6} " +
                    "-verbose -RF NotDuplicateReadFilter -RF CigarContainsNoNOperator " +
                    "-RF MatchingBasesAndQualsReadFilter").format(JAVA_TEMP, opts.xmx_java, GATK, REFERENCE, opts.bam, MARKER_FILE, opts.outfile, opts.java)
else:
    command_line = ("{7} {0} -Xmx{1} -jar {2} -T Pileup -R {3} -I {4} -L {5} -o {6} " +
                    "-verbose -rf DuplicateRead --filter_reads_with_N_cigar " +
                    "--filter_mismatching_base_and_quals").format(JAVA_TEMP, opts.xmx_java, GATK, REFERENCE, opts.bam, MARKER_FILE, opts.outfile, opts.java)

Since GATK4 is open source and available on bioconda, it would make it easier to distribute Conpair with bioconda as well, and further add it into frameworks like bcbio-nextgen.

For the sake of bioconda, it would be convenient to additionally support the gatk executable wrapper when it's in PATH. So instead of calling:

java -Xmx12g -jar gatk4-4.0.7.0-0/gatk-package-4.0.7.0-local.jar Pileup 

It could run:

gatk --java-options '--Xmx12g' Pileup 

Then gatk can be simply added as a conda dependency for Conpair.

Vlad

stroke1989 commented 3 years ago

Great! excellent job

stevekm commented 2 years ago

@vladsavelyev thanks for this but it seems like the filters you listed for GATK4 do not quite match up to the filters used in GATK3. In particular, using these settings with GATK4, I am getting pileup lines that look like this;

6 109818589 A    0

note the missing fifth field.

when I run with GATK3, that line does not get output