mgkit.io.snpdat module

SNPDat reader

class mgkit.io.snpdat.SNPDatRow(line=None, rev_comp=None)

Bases: object

Class containing information ouputted by SNPDat in its result file. One instance contains information about a row in the file.

chr_name

str – the queried SNPs chromosome ID

chr_pos

int – queried SNPs genomic location

in_feat

bool – Whether or not the queried SNP was within a feature

region

str – Region containing the SNP; either exonic, intronic or intergenic

feat_dist

int – Distance to nearest feature

feature

str – Either the closest feature to the SNP or the feature containing the SNP

num_features

int – number of different features that the SNP is annotated to

feat_num

int – number of annotations of the current feature

feat_start

int – Start of feature (bp)

feat_end

int – End of feature (bp)

gene_id

str – gene ID for the current feature

gene_name

str – gene name for the current feature

transcript_id

str – transcript ID for the current feature

transcript_name

str – transcript name for the current feature

exon

tuple – exon that contains the current feature and the total number of annotated exons for the gene containing the feature

strand

str – strand sense of the feature

ann_frame

str – annotated reading frame (when contained in the GTF)

frame

str – reading frame estimated by SNPdat

num_stops

int – estimated number of stop codons in the estimated reading frame

codon

tuple – codon containing the SNP, position in the codon and reference base and mutation

nuc_change

tuple – amino acid for the reference codon and new amino acid with the mutation in place

nuc_ref

str, None – reference nucleotide

aa_change

str – amino acid for the reference codon and new amino acid with the mutation in place

synonymous

bool – Whether or not the mutation is synonymous

protein_id

str – protein ID for the current feature

messages

str – messages in the SNPDat line

aa_change
ann_frame
chr_name
chr_pos
codon
exon
feat_dist
feat_end
feat_num
feat_start
feature
frame
gene_id
gene_name
in_feat
messages
nuc_change
nuc_ref
num_features
num_stops
protein_id
region
strand
synonymous
transcript_id
transcript_name
mgkit.io.snpdat.snpdat_reader(f_handle)

Simple SNPDat reader.

f_handle: file handle or string for the SNPDat result file

Returns:generator of SNPDatRow instances