Пример #1
0
def import_external_fasta(input_file):
    """
    Create a FastaGenome object, set its metadata, and populate it with the
    data from a fasta file.
    Must return the data as the single item in an array, because other file
    formats potentially contain several genomes.
    """
    from nasp.nasp_objects import FastaGenome

    genome = FastaGenome()
    set_genome_metadata(genome, input_file)
    genome.import_fasta_file(genome.file_path(), "franken::")
    # from sys import stdout
    #genome._genome._send_to_fasta_handle( stdout )
    return [genome]
Пример #2
0
def import_external_fasta(input_file):
    """
    Create a FastaGenome object, set its metadata, and populate it with the
    data from a fasta file.
    Must return the data as the single item in an array, because other file
    formats potentially contain several genomes.
    """
    from nasp.nasp_objects import FastaGenome

    genome = FastaGenome()
    set_genome_metadata(genome, input_file)
    genome.import_fasta_file(genome.file_path(), "franken::")
    # from sys import stdout
    #genome._genome._send_to_fasta_handle( stdout )
    return [genome]