001、安装
git clone https://github.com/lh3/seqtk.git cd seqtk/ make ./seqtk | head -n 3
002、fastq格式转换为fasta格式
[s20223040682@admin2 test]$ ls test.fastq [s20223040682@admin2 test]$ seqtk seq -a test.fastq > result.fa [s20223040682@admin2 test]$ ls result.fa test.fastq
003、sample随机抽取reads
[s20223040682@admin2 test]$ ls ## 测试fastq数据 SRR1770413_1.fastq SRR1770413_2.fastq [s20223040682@admin2 test]$ seqtk sample -s100 SRR1770413_1.fastq 10 > sub1.fastq ## sample表示抽样, -s100设置随机种子,跟read2保持一致; 10表示抽取10个reads [s20223040682@admin2 test]$ seqtk sample -s100 SRR1770413_2.fastq 10 > sub2.fastq [s20223040682@admin2 test]$ ls SRR1770413_1.fastq SRR1770413_2.fastq sub1.fastq sub2.fastq [s20223040682@admin2 test]$ ll -h 总用量 856M -rw-rw-r-- 1 s20223040682 s20223040682 428M 1月 20 10:25 SRR1770413_1.fastq -rw-rw-r-- 1 s20223040682 s20223040682 428M 1月 20 10:25 SRR1770413_2.fastq -rw-rw-r-- 1 s20223040682 s20223040682 6.4K 1月 20 10:26 sub1.fastq -rw-rw-r-- 1 s20223040682 s20223040682 6.4K 1月 20 10:26 sub2.fastq [s20223040682@admin2 test]$ wc -l sub* 40 sub1.fastq 40 sub2.fastq 80 总用量
。
标签:rw,s20223040682,fastq,admin2,test,安装,生信,seqtk From: https://www.cnblogs.com/liujiaxin2018/p/18680859