Code Monkey home page Code Monkey logo

Comments (6)

kockan avatar kockan commented on August 17, 2024

Could you try running ValidateSamFile (https://gatk.broadinstitute.org/hc/en-us/articles/21905113856795-ValidateSamFile-Picard) on your input SAM/BAM/CRAM? Looks like the problematic read is unmapped but it's mate somehow has an alignment start position other than 0. The diagnostics might tell us more.

from picard.

vivekbibs avatar vivekbibs commented on August 17, 2024

Many thanks for your quick response !
Here is the output for one of my problematic bams (I have around 20 bams that have the same problem).
They are all coming from PDX samples (patient's tumors graffed into a mouse), that i need to run Variant calling on. But for that i needed to filter-out some of the reads coming from the host (the mouse), and maybe the source of the problem is mouse reads not perfectly filtered-out.
I would be pleased if you could help me with analysing this output.
Would you recommend using CleanSam on it ?
Many thanks again !

HISTOGRAM java.lang.String

Error Type Count
ERROR:INVALID_ALIGNMENT_START 819606
ERROR:INVALID_FLAG_MATE_UNMAPPED 409803
ERROR:INVALID_MAPPING_QUALITY 389111
ERROR:INVALID_TAG_NM 103
ERROR:INVALID_UNALIGNED_MATE_START 409803
ERROR:MATE_NOT_FOUND 3694963
ERROR:MISMATCH_FLAG_MATE_UNMAPPED 378752
ERROR:MISSING_READ_GROUP 1
WARNING:RECORD_MISSING_READ_GROUP 146524865

Tool returned:
2

from picard.

meganshand avatar meganshand commented on August 17, 2024

@vivekbibs It looks like it might be that some of the mates of the mouse reads you filtered out are still in the file. If you filtered out the mouse reads by filtering over a certain interval list, then I'd recommend that you instead try this tool:

java -jar picard.jar FilterSamReads \
  I=input.bam \
   O=output.bam \
   INTERVAL_LIST=regions.interval_list \
   FILTER=includePairedIntervals

This will filter out regions in the interval list and their mates which will hopefully produce a valid bam.

from picard.

vivekbibs avatar vivekbibs commented on August 17, 2024

Thank you for quick response. Unfortunately I don't have a regions.interval_list. In fact, the method we use in our lab to filter the mouse reads is to map the fastq file to a concatenated reference file (mouse reference fasta file and human reference fasta file, concatenated in series). In the mouse reference the chromosomes are referred to as, e.g "chr2" for the chromosome 2, and on the contrary the human chromosomes are referred to as "2", e.g for the human chromosome 2.
Is there a way to filter-out the reads that are aligned to the mouse genome, using FilterSamReads, using the "chr" prefix ?
Many thanks in advance,
Vivek

from picard.

meganshand avatar meganshand commented on August 17, 2024

Yes, but you'll have to generate your own interval list file. Just make an interval list that contains the full length of the chromosomes you want to filter. For more information on the interval list file format please see: https://gatk.broadinstitute.org/hc/en-us/articles/360035531852-Intervals-and-interval-lists

You want the picard-style interval list for this application which is listed in that article as example A.

from picard.

rickymagner avatar rickymagner commented on August 17, 2024

If you have any more questions, feel free to post on the GATK forums.

from picard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.