Mercurial > repos > p.lucas > fasta_to_fastq
comparison fasta_to_fastq.py @ 6:0649236c92ee draft default tip
Uploaded
author | p.lucas |
---|---|
date | Wed, 24 Jul 2024 13:57:37 +0000 |
parents | 2f317786c4e7 |
children |
comparison
equal
deleted
inserted
replaced
5:c89ac5bc114c | 6:0649236c92ee |
---|---|
3 | 3 |
4 """ | 4 """ |
5 | 5 |
6 Convert fasta fle to fastq file with given score | 6 Convert fasta fle to fastq file with given score |
7 Written by Pierrick Lucas. | 7 Written by Pierrick Lucas. |
8 Usage : python fastq_to_fastq.py -i sequences.fasta -s 40 -o output_file.fastq | 8 Usage : python fasta_to_fastq.py -i sequences.fasta -s 40 -o output_file.fastq |
9 | 9 |
10 """ | 10 """ |
11 | 11 |
12 # Import | 12 # Import |
13 import argparse | 13 import argparse |
16 from Bio import SeqIO | 16 from Bio import SeqIO |
17 | 17 |
18 ##### MAIN | 18 ##### MAIN |
19 def __main__(): | 19 def __main__(): |
20 # Options : | 20 # Options : |
21 parser = argparse.ArgumentParser(description="""Takes a fasta file and converts it to fastq file with a fake quality score.""", | 21 parser = argparse.ArgumentParser(description="""Take a fasta file and converts it to fastq file with a given quality score.""", |
22 epilog="""This script need few options, use -h to see it.""") | 22 epilog="""This script need few options, use -h to see it.""") |
23 parser.add_argument("-i", "--infile", dest="infile", help="Input fasta file.") | 23 parser.add_argument("-i", "--infile", dest="infile", help="Input fasta file.") |
24 parser.add_argument("-s", "--score", type=int, default=40, dest="score", help="Quality score you wanted for each base in all reads. (default: 40)") | 24 parser.add_argument("-s", "--score", type=int, default=40, dest="score", help="Quality score you wanted for each base in all reads. (default: 40)") |
25 parser.add_argument("-o", "--outfile", dest="outfile", help="Output file in fastq format.") | 25 parser.add_argument("-o", "--outfile", dest="outfile", help="Output file in fastq format.") |
26 | 26 |