将fasta fastq文件线性化处理

将fasta文件线性化处理

awk '/^>/ {printf("%s%s\t",(N>0?"\n":""),$0);N++;next;} {printf("%s",$0);} END {printf("\n");}' < input.fa
cat Rmh.fasta | awk '{printf("%s%s",$0,((NR+1)%2==1?"\n":"\t"));}' | less -S
curl -s  "ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz" | gunzip -c | awk '/^>/ {printf("%s%s\t",(N>0?"\n":""),$0);N++;next;} {printf("%s",$0);} END {printf("\n");}'  | less -S
cat input.fasta | paste - - | less -S

将fastq文件线性化处理

cat Rmh.fastq | awk '{printf("%s%s",$0,((NR+1)%4==1?"\n":"\t"));}' | less -S
cat input.fastq | paste - - - - | less -S

 

posted on 2019-08-26 12:08  0820LL  阅读(169)  评论(0编辑  收藏  举报

导航