def write_sequence(name, seq, qual, seq_fh, qual_fh):
 if (len(seq) == 0):
  return
 if (qual_fh is None):
  seq_fh.write(format_as_fastq(name, seq, qual))
 else:
  (seqstring, qualstring) = format_as_fasta(name, seq, qual)
  seq_fh.write(seqstring)
  qual_fh.write(qualstring)
 return

def write_sequence ( name , seq , qual , seq_fh , qual_fh ) : if ( len ( seq ) == 0 ) : return if ( qual_fh is None ) : seq_fh . write ( format_as_fastq ( name , seq , qual ) ) else : ( seqstring , qualstring ) = format_as_fasta ( name , seq , qual ) seq_fh . write ( seqstring ) qual_fh . write ( qualstring ) return
write sequence and quality fasta and fasta qual filehandles if sequence length is 0 .