Skip to content

Instantly share code, notes, and snippets.

@jsun
jsun / convert_gtf.py
Last active August 31, 2018 03:46
Convert coordinates in GTF file with VCF file.
import sys
import os
## Description:
## This script is used for converting the coordinates in GTF file
## with the VCF file.
##
## Usage:
## python convert_gtf.py sampl.vcf sampl.gtf > modified_sampl.gtf
@jsun
jsun / calc_cdna_len.py
Last active February 6, 2019 09:20
Calculation of non-overlapping exon length with GTF file.
import sys
import re
## Description:
## Calculation of non-overlapping exon length with GFF file for each gene.
##
## e.g) Gene G has four transcripts: Ga, Gb, Gc, and Gd. The four transcripts
## have different numbers of exons and different combinations of exons.
## Some regions are shared with the four transcripts, and some regions
## are only used by a single transcript. These information are saved in