Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GATK 4 #11

Open
vladsavelyev opened this issue Oct 5, 2018 · 2 comments · May be fixed by #12
Open

Support GATK 4 #11

vladsavelyev opened this issue Oct 5, 2018 · 2 comments · May be fixed by #12

Comments

@vladsavelyev
Copy link

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
Copy link

Great! excellent job

@stevekm
Copy link

stevekm commented Nov 16, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants