美文网首页
2019-07-29 两文件取交集

2019-07-29 两文件取交集

作者: 阿乜太帅 | 来源:发表于2019-07-29 20:42 被阅读0次
gawk 'ARGIND==1{a[$1]=$1} ARGIND==2{if(a[$1]!="") print $0}' geneid.txt tpm.txt > gene.tpm.txt
awk 'NR==FNR{a[$1]=$0;next}NR>FNR{if($1 in a)print a[$1]"\t"$0}' A B > C
awk 'NR==FNR{a[$1]=$0;next}{if ($1 in a){print a[$1]"\t"1} else {print $0"\t"0}}' A B  > C
 grep -w -A 1 -Ff genename gene.fasta --no-group-separator > genename.fasta

相关文章

网友评论

      本文标题:2019-07-29 两文件取交集

      本文链接:https://www.haomeiwen.com/subject/xewirctx.html