Input/output utilities

allel.io.write_vcf(path, variants, rename=None, number=None, description=None, fill=None, write_header=True)[source]
allel.io.write_fasta(path, sequences, names, mode='w', width=80)[source]

Write nucleotide sequences stored as numpy arrays to a FASTA file.

Parameters:

path : string

File path.

sequences : sequence of arrays

One or more ndarrays of dtype ‘S1’ containing the sequences.

names : sequence of strings

Names of the sequences.

mode : string, optional

Use ‘a’ to append to an existing file.

width : int, optional

Maximum line width.

allel.io.iter_gff3(path, attributes=None, region=None, score_fill=-1, phase_fill=-1, attributes_fill='.')[source]