bams2bam.py - merge genomic and transcriptome mapped bamfiles¶
- Tags
Genomics NGS Geneset BAM Manipulation
Purpose¶
This script takes as input two BAM files from an RNASeq experiment.
The first bam file (bamG
) should contain reads mapped against
the genome using a mapper permitting splicing (e.g. tophat). The
second bam file (bamT
) should contain reads mapped against
known transcripts. This script will write a new bam file that removes
reads from bamG that map to regions that are conflicting with
those in bamT.
Note
Note that if junctions are supplied, the resultant bam files will not be sorted by position.
Usage¶
Example:
python bams2bam.py bamT.bam bamG.bam
Type:
python bams2bam.py --help
for command line help.
Documentation¶
The script needs to look-up reads via their names. It thus builds an index of reads mapping
This script requires the NM attributes to be set. If it is not set, you will need to set a policy.
Command line options¶
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/cgat-apps/conda/latest/bin/cgat", line 11, in <module>
sys.exit(main())
File "/home/docs/checkouts/readthedocs.org/user_builds/cgat-apps/conda/latest/lib/python3.7/site-packages/cgat/cgat.py", line 132, in main
module.main(sys.argv)
File "/home/docs/checkouts/readthedocs.org/user_builds/cgat-apps/conda/latest/lib/python3.7/site-packages/cgat/tools/bams2bam.py", line 79, in main
usage=globals()["__doc__"])
File "/home/docs/checkouts/readthedocs.org/user_builds/cgat-apps/conda/latest/lib/python3.7/site-packages/cgatcore/experiment.py", line 510, in __init__
**kwargs)
TypeError: __init__() got an unexpected keyword argument 'version'