ivy.genbank module

ivy.genbank.ac2gi(ac)[source]
ivy.genbank.batch(iterable, size)[source]

Take an iterable and return it in chunks (sub-iterables)

Parameters:
  • iterable – Any iterable
  • size (int) – Size of chunks
Yields:

Chunks of size size

ivy.genbank.blast(query, e=10, n=100, entrez_query=u'')[source]
ivy.genbank.blast_closest(fasta, e=10)[source]
ivy.genbank.create_fastas(data, genes)[source]
ivy.genbank.extract_gbac(s)[source]

Extract genbank accession

Parameters:s (str) – text string of genbank file
Returns:Accession number(s)
Return type:list
ivy.genbank.extract_gene(seq, gene)[source]

RR: Not sure what format seq should be in -CZ

ivy.genbank.fetch_DNA_seqs(terms, maxn=10000, batchsize=1000)[source]
terms: sequence of search terms, quoted appropriately, with Entrez
specifiers, e.g. [‘“Mus musculus”[organism]’]

maxn: maximum number of sequences to return returns list of SeqRecord objects

ivy.genbank.fetch_aclist(aclist, batchsize=1000)[source]
ivy.genbank.fetch_gilist(gilist, batchsize=1000)[source]
ivy.genbank.fetchseq(gi)[source]
ivy.genbank.fetchtax(taxid)[source]
ivy.genbank.gi2tax(gi)[source]
ivy.genbank.gi2webenv(gilist)[source]
ivy.genbank.merge_fastas(fnames, name=u'merged')[source]
ivy.genbank.organism_id(s)[source]
ivy.genbank.search_taxonomy(q)[source]
ivy.genbank.seqrec_taxid(seqrec)[source]

extract the NCBI taxon id from a sequence record

ivy.genbank.start_codons(seq)[source]
ivy.genbank.trimpos(rec)[source]

return the positions of the first and last ungapped base