swell/swell.py
def swell_from_fasta(fasta_path):
    '''
    Calculate fasta statistics given the path to a fasta/multifasta.
    '''
    if fasta_path == "-":
        fastas = readfq.readfq(sys.stdin)
    else:
        fastas = readfq.readfq(open(fasta_path))
        
    rows = []
    for name, seq, qual in fastas:
        rows.append([fasta_path, name] + calculate_fasta_stats(seq))

    if fasta_path != "-":
        fastas.close()
    return ["fasta_path", "header", "num_seqs", "num_bases", "pc_acgt", "pc_masked", "pc_invalid", "pc_ambiguous", "longest_gap", "longest_ungap"], rows

    Calculate fasta statistics given the path to a fasta/multifasta.
    
Calculate fasta statistics given the path to a fasta/multifasta.
Calculate fasta statistics given the path to a fasta / multifasta .
def swell_from_fasta(fasta_path):
    if fasta_path == "-":
        fastas = readfq.readfq(sys.stdin)
    else:
        fastas = readfq.readfq(open(fasta_path))
    rows = []
    for name, seq, qual in fastas:
        rows.append([fasta_path, name] + calculate_fasta_stats(seq))
    if fasta_path != "-":
        fastas.close()
    return ["fasta_path", "header", "num_seqs", "num_bases", "pc_acgt", "pc_masked", "pc_invalid", "pc_ambiguous", "longest_gap", "longest_ungap"], rows
def swell_from_fasta ( fasta_path ) : if fasta_path == "-" : fastas = readfq . readfq ( sys . stdin ) else : fastas = readfq . readfq ( open ( fasta_path ) ) rows = [ ] for name , seq , qual in fastas : rows . append ( [ fasta_path , name ] + calculate_fasta_stats ( seq ) ) if fasta_path != "-" : fastas . close ( ) return [ "fasta_path" , "header" , "num_seqs" , "num_bases" , "pc_acgt" , "pc_masked" , "pc_invalid" , "pc_ambiguous" , "longest_gap" , "longest_ungap" ] , rows
Calculate fasta statistics given the path to a fasta/multifasta.
Calculate fasta statistics given the path to a fasta / multifasta .
'''
    Calculate fasta statistics given the path to a fasta/multifasta.
    '''
fasta_path