@@ -0,0 +1,823 @@
+%22%22%22%0ARename the sequences in a fasta file%0A%0AIf you give an optional -r the sequences will be renamed with that, otherwise with the file name%0A%22%22%22%0A%0Aimport os%0Aimport sys%0Aimport argparse%0Afrom roblib import stream_fasta%0A%0A__author__ = 'Rob Edwards'%0A%0Aif __name__ == %22__main__%22:%0A    parser = argparse.ArgumentParser(description='Rename the sequences in a fasta file')%0A    parser.add_argument('-f', help='input fasta file', required=True)%0A    parser.add_argument('-r', help='string to rename the seqids to. Default=use the file name')%0A    parser.add_argument('-v', help='verbose output', action='store_true')%0A    args = parser.parse_args()%0A%0A    if args.r:%0A        ren = args.r%0A    else:%0A        ren = args.f%0A%0A    counter = 0%0A    for seqid, seq in stream_fasta(args.f):%0A        counter += 1%0A        print(f%22%3E%7Bren%7D_%7Bcounter%7D%5Cn%7Bseq%7D%5Cn%22)%0A

Rename fasta files