https://github.com/fpoli/genome-track
Bioinformatics CLI tool to generate WIG tracks from SAM/BAM files
https://github.com/fpoli/genome-track
bioinformatics genome-track pysam sequence-coverage wig-tracks
Last synced: 11 months ago
JSON representation
Bioinformatics CLI tool to generate WIG tracks from SAM/BAM files
- Host: GitHub
- URL: https://github.com/fpoli/genome-track
- Owner: fpoli
- License: gpl-3.0
- Created: 2016-02-26T17:23:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-26T17:45:23.000Z (over 10 years ago)
- Last Synced: 2025-03-25T18:52:36.256Z (about 1 year ago)
- Topics: bioinformatics, genome-track, pysam, sequence-coverage, wig-tracks
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
Genome-track
============
Command line program to generate WIG tracks (sequence coverage, physical coverage, average insert length, ...) from a SAM/BAM file.
Academic project for the Bioinformatics course at University of Padova. Written in Python 3 using PySAM.
Quick start
-----------
1. Check to have a Python 3 interpreter `python3 --version`
2. Install PySAM `pip3 install pysam`
3. Generate the sequence coverage
`./gtrack.py sequence_coverage -g genome.fasta -i alignments.sam -o sequence_coverage.wig`
Examples
--------
```
./gtrack.py sequence_coverage -g genome.fasta -i alignments.sam -o sequence_coverage.wig
./gtrack.py sequence_coverage -l 123456789000 -i alignments.sam -o sequence_coverage.wig
./gtrack.py physical_coverage -g genome.fasta -i alignments.sam > physical_coverage.wig
./gtrack.py physical_coverage -g genome.fasta -i alignments.sam -o physical_coverage.wig
./gtrack.py average_insert -g genome.fasta -i alignments.sam -o physical_coverage.wig
./gtrack.py average_insert --min 100 --max 50000 -g genome.fasta -i alignments.sam -o physical_coverage.wig
...
```
Usage
-----
```
usage: gtrack.py [-h] -i INPUT [-o OUTPUT] (-l LENGTH | -g GENOME) [--min MIN]
[--max MAX]
{sequence_coverage,rf_mates,hs_cigar,average_insert,ff_mates,fr_mates,single_mate,rr_mates,ffrr_mates,multiple_mapping,physical_coverage_lowmem,sequence_coverage_lowmem,physical_coverage}
Generate WIG tracks from reads aligned on a reference genome.
positional arguments:
{sequence_coverage,rf_mates,hs_cigar,average_insert,ff_mates,fr_mates,single_mate,rr_mates,ffrr_mates,multiple_mapping,physical_coverage_lowmem,sequence_coverage_lowmem,physical_coverage}
Name of the track to be computed.
optional arguments:
-h, --help show this help message and exit
-i INPUT, --input INPUT
SAM/BAM input file.
-o OUTPUT, --output OUTPUT
WIG output file. The default is stdout.
-l LENGTH, --length LENGTH
Length of the reference genome.
-g GENOME, --genome GENOME
Fasta file of the reference genome.
--min MIN Inserts below this value will be ignored.
--max MAX Inserts above this value will be ignored.
```
License
-------
Genome-track generates WIG tracks from reads aligned on a reference genome.
Copyright (C) 2016 Federico Poli
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .