def truncate_seqs(fasta_seqs, qual_scores, base_pos):
 trunc_fasta_seqs = {}
 trunc_qual_scores = {}
 for seq in fasta_seqs:
  trunc_fasta_seqs[seq] = fasta_seqs[seq][:base_pos]
  trunc_qual_scores[seq] = qual_scores[seq][:base_pos]
 return (trunc_fasta_seqs, trunc_qual_scores)

def truncate_seqs ( fasta_seqs , qual_scores , base_pos ) : trunc_fasta_seqs = { } trunc_qual_scores = { } for seq in fasta_seqs : trunc_fasta_seqs [ seq ] = fasta_seqs [ seq ] [ : base_pos ] trunc_qual_scores [ seq ] = qual_scores [ seq ] [ : base_pos ] return ( trunc_fasta_seqs , trunc_qual_scores )
truncates sequences to base position specified with base_pos fasta_seqs: dict of seq label: seq string qual_scores: dict of seq label: numpy array of int scores base_pos: index in sequence to truncate at .