biopython

from Bio import SeqIO
import sys
import re
#regular expression

file_input = sys.argv[1]
file_output = sys.argv[2]

pattern = r'channel_6.*'
regexp = re.compile(pattern)

with open(file_output,"a") as output_file:
  for seq_record in SeqIO.parse(file_input,"fasta"):
     if regexp.search(seq_record.id):
       SeqIO.write(seq_record,output_file,"fasta")
#for seq_record in SeqIO.parse(file_input,"fasta"):
#  SeqIO.write(seq_record,file_output,"fasta")