bioplus.fasta

meta-tools for large FASTA files

bioplus.fasta.count(foo)[source]

takes a file named foo returns the number lines

bioplus.fasta.pad(x, y)[source]

takes two integers x and y, and returns str(x) with enough 0s to match the length of str(y)

bioplus.fasta.permute_fasta(f)[source]

takes a FASTA file and returns a new FASTA file with each sequence randomly permuted (separately, such that its % A,T,G,C doesn’t change)

bioplus.fasta.random_files(foo, n, R)[source]

takes a FASTA file foo and creates (in the current directory) R random files each containing n random sequences from foo, named foo_random[0-R].fa

bioplus.fasta.random_seq(foo, n)[source]

takes a file foo and returns n random sequences from it

bioplus.fasta.reader(foo)[source]

generator yielding Bio.Seq.Seq objects from a FASTA file

bioplus.fasta.truncate_lines(f, n)[source]

truncate_lines(f,n) truncates lines in a file to at most n characters See truncate_seqs to truncate sequences instead of lines

bioplus.fasta.truncate_seqs(f, n)[source]

truncate FASTA seqs truncates sequences in a FASTA file named f to at most n bases, writing a new FASTA file named f.n.fa

bioplus.fasta.writer(foo, iterable)[source]

writes SeqRecord objects from iterable to FASTA file foo. Warning: overwrites foo, does not append

Previous topic

bioplus.wrappers

Next topic

bioplus.genometools

This Page