首页 > 其他 > 详细

seqtk安装和使用

时间:2017-01-19 14:06:43      阅读:1070      评论:0      收藏:1      [点我收藏+]

标签:direct   soft   rect   ber   ati   mask   with   and   ons   

Installation:

Just to cover the ‘how to obtain the code‘ part. You will need to have git installed need to clone the seqtk url:
git clone https://github.com/lh3/seqtk.git 

then switch to the seqtk directory and make it:

cd seqtk
make

Now you can invoke it as such:

~/mypath/to/seqtk/seqtk

Usage:
  • Convert FASTQ to FASTA:

    seqtk seq -a in.fq.gz > out.fa
    
  • Convert ILLUMINA 1.3+ FASTQ to FASTA and mask bases with quality lower than 20 to lowercases (the 1st command line) or to N (the 2nd):

    seqtk seq -aQ64 -q20 in.fq > out.fa
    seqtk seq -aQ64 -q20 -n N in.fq > out.fa
    
  • Fold long FASTA/Q lines and remove FASTA/Q comments:

    seqtk seq -Cl60 in.fa > out.fa
    
  • Convert multi-line FASTQ to 4-line FASTQ:

    seqtk seq -l0 in.fq > out.fq
    
  • Reverse complement FASTA/Q:

    seqtk seq -r in.fq > out.fq
    
  • Extract sequences with names in file name.lst, one sequence name per line:

    seqtk subseq in.fq name.lst > out.fq
    
  • Extract sequences in regions contained in file reg.bed:

    seqtk subseq in.fa reg.bed > out.fa
    
  • Mask regions in reg.bed to lowercases:

    seqtk seq -M reg.bed in.fa > out.fa
    
  • Subsample 10000 read pairs from two large paired FASTQ files (remember to use the same random seed to keep pairing):关键是可以实现随机抽取序列

    seqtk sample -s100 read1.fq 10000 > sub1.fq
    seqtk sample -s100 read2.fq 10000 > sub2.fq
  • Trim low-quality bases from both ends using the Phred algorithm:

    seqtk trimfq in.fq > out.fq
    
  • Trim 5bp from the left end of each read and 10bp from the right end:

    seqtk trimfq -b 5 -e 10 in.fa > out.fa
 

seqtk安装和使用

标签:direct   soft   rect   ber   ati   mask   with   and   ons   

原文:http://www.cnblogs.com/Datapotumas/p/6306192.html

(0)
(0)
   
举报
评论 一句话评论(0
0条  
登录后才能评论!
© 2014 bubuko.com 版权所有 鲁ICP备09046678号-4
打开技术之扣,分享程序人生!
             

鲁公网安备 37021202000002号