fasta文件与fastq文件相互转化

fastq转化为fasta

一般应该是由fastq转化为fasta(给出四种):

1 linux下直接: sed -n '1~4s/^@/>/p;2~4p' in.fastq > out.fasta
2 perl:  perl -ne 'y/@/>/;print($_.<>)&&<>&&<>' your_file.fastq > output_file.fasta
3 seqtk包下载(bioconda),再用:  seqtk seq -A input_file.fastq > output_file.fasta
4 在线网址: https://test.galaxyproject.org/

fasta改为fastq

fasta文件缺失信息,假设quality score of 40。
Perl将fasta改为fastq

下载程序

 wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/fasta-to-fastq/fasta_to_fastq.pl

使用

perl fasta_to_fastq.pl reads.fasta > my_converted_fasta.fq

参考来自:
https://www.researchgate.net/post/How_can_I_convert_FASTQ_to_FASTA_format

https://code.google.com/archive/p/fasta-to-fastq/

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容