G***G 发帖数: 16778 | 1 a tab delimited text file has 7 columns
the 7th column is pvalue.
which bash command can let us choose all the rows with pvalue <0.01?
suppose the result file is A.
I have another two questions about bash.
How to remove first line from a file B using bash, and then combine with
file A
into a new file C?
Sorry, I am a windows guy, not familiar with mac or linux. |
f**********e 发帖数: 1994 | 2 用 awk
【在 G***G 的大作中提到】 : a tab delimited text file has 7 columns : the 7th column is pvalue. : which bash command can let us choose all the rows with pvalue <0.01? : suppose the result file is A. : I have another two questions about bash. : How to remove first line from a file B using bash, and then combine with : file A : into a new file C? : Sorry, I am a windows guy, not familiar with mac or linux.
|
G***G 发帖数: 16778 | 3 thank you.
how to combine two files, one of two files are from awk?
【在 f**********e 的大作中提到】 : 用 awk
|
e*******o 发帖数: 4654 | 4 1. perl -ane 'print if $F[6] < 0.01' youfile >answer
2. tail -n +2 a.txt | cat - b.txt > c.txt
这些都是奇技淫巧,从学习角度不如都用python 或者 perl 来做, |
G***G 发帖数: 16778 | 5 thank you very much
【在 e*******o 的大作中提到】 : 1. perl -ane 'print if $F[6] < 0.01' youfile >answer : 2. tail -n +2 a.txt | cat - b.txt > c.txt : 这些都是奇技淫巧,从学习角度不如都用python 或者 perl 来做,
|
s******s 发帖数: 13035 | 6 awk '$7<0.01 {print $0}' A > output.txt
【在 G***G 的大作中提到】 : a tab delimited text file has 7 columns : the 7th column is pvalue. : which bash command can let us choose all the rows with pvalue <0.01? : suppose the result file is A. : I have another two questions about bash. : How to remove first line from a file B using bash, and then combine with : file A : into a new file C? : Sorry, I am a windows guy, not familiar with mac or linux.
|
d******b 发帖数: 42 | 7 cat | awk -F'\t' '$7<0.01 {print $0}' > A; cat B | grep -v "$(
cat B | head -1)" > C; cat A >> C
This will not work when the first line of B is a subset of some other lines
though. I would just use a text editor to remove the title line.
【在 G***G 的大作中提到】 : a tab delimited text file has 7 columns : the 7th column is pvalue. : which bash command can let us choose all the rows with pvalue <0.01? : suppose the result file is A. : I have another two questions about bash. : How to remove first line from a file B using bash, and then combine with : file A : into a new file C? : Sorry, I am a windows guy, not familiar with mac or linux.
|
K****n 发帖数: 5970 | 8 牛! perl都会。横着combine可以用paste
【在 e*******o 的大作中提到】 : 1. perl -ane 'print if $F[6] < 0.01' youfile >answer : 2. tail -n +2 a.txt | cat - b.txt > c.txt : 这些都是奇技淫巧,从学习角度不如都用python 或者 perl 来做,
|
o******n 发帖数: 511 | |
e*******o 发帖数: 4654 | 10 大牛才干啥都横着。
【在 K****n 的大作中提到】 : 牛! perl都会。横着combine可以用paste
|
|
|
e*******o 发帖数: 4654 | 11 不用到某个统计方法,好意思用R?
第一个问题用R,还凑合,第二个问题用R 就只自找苦吃了。
建议你学学python.
【在 o******n 的大作中提到】 : 为啥不用R做?
|
s******r 发帖数: 1245 | 12 为啥不用excel
windows guy用bash不是吃饱了撑的嘛 |
c********e 发帖数: 598 | 13
Be creative, use Javascript! 图漂亮,动态。
【在 e*******o 的大作中提到】 : 不用到某个统计方法,好意思用R? : 第一个问题用R,还凑合,第二个问题用R 就只自找苦吃了。 : 建议你学学python.
|
s******s 发帖数: 13035 | 14 R慢啊,而且大文件伤内存,python/perl/bash巨快
【在 o******n 的大作中提到】 : 为啥不用R做?
|
f**********e 发帖数: 1994 | 15 D3 是比較爽
【在 c********e 的大作中提到】 : : Be creative, use Javascript! 图漂亮,动态。
|
f**********e 发帖数: 1994 | 16 preprocessing 用 R 也不太爽。
【在 s******s 的大作中提到】 : R慢啊,而且大文件伤内存,python/perl/bash巨快
|