Skip to content

Instantly share code, notes, and snippets.

# CoordinateMapper -- map between genomic, cds, and protein coordinates
# AUTHOR: Reece Hart <reecehart@gmail.com>
# Modifications: Lenna X. Peterson <arklenna@gmail.com>
# LICENSE: BioPython
# Examples:
# AB026906.1:g.7872G>T
# AB026906.1:c.274G>T
# BA...:p.Asp92Tyr
#
@lennax
lennax / coord_map.py
Created April 13, 2014 20:05
biopython coordinate mapper example
# Copyright 2012-2014 Lenna X. Peterson
# arklenna@gmail.com
# The first step to using the mapper is to get the exons from a GenBank or similar file.
# The mapper will accept exons as a sequence of pairs, a SeqRecord with a CDS feature, or a CDS SeqFeature.
# The file used in this example is located in the Tests directory of the Biopython source code.
from Bio.SeqUtils.Mapper import CoordinateMapper
from Bio import SeqIO
@lennax
lennax / get_torsion.py
Last active June 29, 2023 18:17
Script to calculate side-chain torsion angles from PDB files
#!/usr/bin/env python
# Copyright (c) 2014 Lenna X. Peterson, all rights reserved
# lenna@purdue.edu
import argparse
import csv
import glob
import logging
import math
import os