Giter Site home page Giter Site logo

ExtractHLAread.sh about spechla HOT 5 CLOSED

deepomicslab avatar deepomicslab commented on August 16, 2024
ExtractHLAread.sh

from spechla.

Comments (5)

wshuai294 avatar wshuai294 commented on August 16, 2024

Hi,

  • The bam file should be sorted by coordinates using samtools sort, because ExtractHLAread.sh extracts HLA-related reads by coordinates. In converting bam to fastq, samtools fastq can handle such bam file.

As for the large number of unpaired reads, please check following two points:

  • please ensure the reference version (hg19 or hg38) is the same between generating bam and running ExtractHLAread.sh.
  • For the unpaired reads, please check the alignment situation in the bam, see what alleles the unextracted read end mapped to.

please let me know if it works.

Best,
shuai

from spechla.

vegetableyu avatar vegetableyu commented on August 16, 2024

Hi shuai,
I looked at samtools fastq --help, which also says it needs to be sorted by reads name. However, using samtools fastq for bam files sorted by reads name and coordinates yielded little difference in results. With bam bam2Fastq, however, bam files sorted by read name get 20 times as many paired reads as those sorted by coordinates.
samtools

from spechla.

wshuai294 avatar wshuai294 commented on August 16, 2024

Hi,
Apologies for any confusion caused. It seems that ExtractHLAread.sh utilizes bam bam2Fastq to obtain the fastq files. In order to investigate the discrepancy in read numbers resulting from bam bam2Fastq, I suggest examining the reads extracted from the "sorted by read name" but not from the "sorted by coordinates" approach. Please select a subset of these reads and verify the regions to which they are mapped by examining the BAM. If the reads belong to the HLA region, it is likely that the "sorted by read name" approach is correct; otherwise, the "sorted by coordinates" approach may be more appropriate.

By the way, could you please check the alignment detail of the reads ("unpaired reads produced are far more than the paired reads") in the original BAM.

from spechla.

vegetableyu avatar vegetableyu commented on August 16, 2024

Hi shuai,
Thanks for your reply and suggestions, i will check this later. I noticed that others were also discussing the issue of preprocessing and gave some suggestions. This might help:
Kingsford-Group/kourami#30
https://bitbucket.nygenome.org/projects/COMPBIO/repos/hla_prep/browse

from spechla.

wshuai294 avatar wshuai294 commented on August 16, 2024

Thanks for the information. According to the issue, the reason of extracting too much unpaired reads might be keeping multiple alignments other than only the primary alignment.

from spechla.

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.