def addStartTag(in_path, out_path): FH_in = FastaIO(in_path) FH_out = FastaIO(out_path, "w") for record in FH_in: record.string = "^" + record.string FH_out.write(record) FH_in.close() FH_out.close()
help= 'Path to the definition of the amplicons (format: Illumina manifest).') group_output = parser.add_argument_group('Outputs') # Outputs group_output.add_argument( '-f', '--fwd-barcodes', default="fwd_barcodes.fasta", help= '******************************** (format: fasta). [Default: %(default)s]' ) group_output.add_argument( '-r', '--rvs-barcodes', default="rvs_barcodes.fasta", help= '******************************** (format: fasta). [Default: %(default)s]' ) args = parser.parse_args() # Process amplicons = getAmplicons(args.input_manifest) FH_fwd = FastaIO(args.fwd_barcodes, "w") FH_rvs = FastaIO(args.rvs_barcodes, "w") for ampl in amplicons: record_fwd = Sequence(ampl.name, ampl.up_primer) FH_fwd.write(record_fwd) record_rvs = Sequence(ampl.name, revcom(ampl.down_primer)) FH_rvs.write(record_rvs) FH_fwd.close() FH_rvs.close()