命令行整理

来源:互联网 发布:java 格式化xml字符串 编辑:程序博客网 时间:2024/05/21 10:43

提取fastq文件中的一部分序列来进行测试:

zcat ERR022075pe.fasta.gz | head ­1500000 > subset.fasta


The gene models in GTF format,我们现在只想要二号染色体的相关信息:

cat genes.gtf | grep “^chr2” > genes-chromosome2.gtf


统计fastq reads的碱基数目:

cat test.fastq | paste - - - - | cut -f 2 | tr -d '\n' | wc -c 


统计fasta文件中序列的条数:

awk '/>/ { count++ } END { print count }' test.fasta

方法二:

cat test.fasta | grep ">" | wc -l



0 0