Search Results

Search: Posts Made By: forevertl
5,978
Posted By forevertl
How to make a .exe file executable in Linux?
Dear all,
I download a .exe file in my current folder called: ukbmd5.exe. I was told to run the command below: ukbmd5 ukb25278.enc to verify the integrity of the files that you have downloaded and...
913
Posted By forevertl
Question on grep command (extract a string)
Dear all,
I have a file a.txt like below:
1_234560_A_G_b37 1 2 1 2 2 2 ...
1_35465767_C_T_b37 2 1 1 2 2 2 ...
2_490638010_A_T_b37 1 2 1 2 2 2 ...
10_4567899_T_G_b37 2 2 1 2 2 2 ...
...
34,939
Posted By forevertl
Dear RudiC, You are right. When I delete...
Dear RudiC,
You are right. When I delete everything and re-type it . It works. Thank you very much!
Lin
34,939
Posted By forevertl
Grep error "No such file or directory" not solved
Dear all,
I run a simple command:
grep -f GTEx_snps.txt chr1_r2.txt>chr1_r2_GTEx.txt

and got error: "chr1_r2_GTEx.txt: No such file or directory" while "chr1_r2_GTEx.txt is an...
8,178
Posted By forevertl
Find and replace a string in a text file
Dear all,

I want to find all the "," in my text file and then replace the commas to a tab. I found a script online but I don't know how to modify the script for my case. Any one can help?...
2,840
Posted By forevertl
Thank you guys. I tried the code below and it...
Thank you guys. I tried the code below and it works.
awk 'NR==FNR {A[$1]; next} ($1 in A)' stringfile test1>test2
2,840
Posted By forevertl
Issue when using egrep to extract strings (too many strings)
Dear all,
I have a data like below (n of rows=400,000) and I want to extract the rows with certain strings. I use code below. It works if there is not too many strings for example n of strings...
4,021
Posted By forevertl
This code works well. Thank you very much. Lin
This code works well. Thank you very much.
Lin
4,021
Posted By forevertl
Thank you for your reply. I made the change and...
Thank you for your reply. I made the change and the code below doesn't work. All the columns still merged into one column.
awk -F" " '{ for (i=1; i<=NF; i++) printf "%.3f\n", $i }' test.txt >...
4,021
Posted By forevertl
I tried this code below and I got all the numbers...
I tried this code below and I got all the numbers trimed but all the columns merged to one single column. Anyone any any idea how I can change the code?

awk -F" " '{ for (i=1; i<=NF; i++) printf...
4,021
Posted By forevertl
How to trim the decimal place for all the columns?
Dear all,
I have a file call test.txt which has 2000 columns, 1000 rows. If I want to trim all the columns to 3 decimal places, how can I do it? I know how to use awk prinf to trim specic columns....
33,283
Posted By forevertl
I tried the first code and it works. Thanks a lot!
I tried the first code and it works. Thanks a lot!
33,283
Posted By forevertl
How to set decimal place in awk?
Dear all,
I have a data test.txt as below.

X22.30799720_T cg03868770 -0.5645412582127 2.4084685750406e-175
X22.30781182_A cg03868770 -0.5620426397492 3.5818034129169e-172
X22.30780724_C...
1,160
Posted By forevertl
thank you for your reply. either way is fine for...
thank you for your reply. either way is fine for me. whichever has code easier to understand for beginners is fine for me. Since each command will take similar time, so waiting all 20 command are...
1,160
Posted By forevertl
UNIX loop question
Dear all,

I have a question regarding unix loops. I want to run 100 commands using file1.txt-file100.txt in parallel. I use the code below and it works well. But now I want to run first 20...
1,073
Posted By forevertl
seem it doesn't work. The total # of row in the...
seem it doesn't work. The total # of row in the output file changed. Thanks a lot.
Lin
1,073
Posted By forevertl
one issue
Hi,
Thanks a lot for the reply. I forgot to mention that there is some "NA" in the file, now using the code, it works well except for those NAs. The NA changed to 0.000 now. Is there a way that...
1,073
Posted By forevertl
How to control the decimal poins for the whole .txt file?
Dear all,
I have a .txt file with n=400 columns, n=440,000 rows. The file looks like below:
-0.0625123454 0.03732424 -0.11293423 ...
0.15651325435 -0.1366346346 -0.28384636 ...
...

...
1,156
Posted By forevertl
It works well. Thank you!
awk '$1 = $1 + 0' CONVFMT="%.3g" infile > outfile
1,156
Posted By forevertl
How to control the decimal points for p-values in scientific format?
Dear all,
I have a txt file with only one column which contains p values. My data looks like this:
5.04726976606584e-190
2.94065711152402e-189
2.94065711152402e-189
9.19932135717279e-176...
1,394
Posted By forevertl
How to generate one long column by merging two separate two columns in a single file?
Dear all,
I have a simple question. I have a file like below (separated by tab):

col1 col2 col3 col4 col5 col6 col7
21 66745 rs1234 21 rs5678 ...
5,173
Posted By forevertl
thank you. as you said, the default works. I...
thank you. as you said, the default works. I didn't know that before. thanks!
Lin
5,173
Posted By forevertl
Join command: how to keep all fields in one data
Dear all,

I 'd like to ask a question. I have two datasets: a.txt (only has one filed, call 'SNP'), b.txt( has thousands of fields, 1st field call 'SNP').

a.txt:
rs9527
rs318567
rs12376...
3,301
Posted By forevertl
how to generate random number as as the first column of a txt file
Dear all,

I have a question. I have a txt file say 4000 rows X 1800 Column. I 'd like to creat a new column as the first column which is a column of random numbers (n=4000)

thanks a lot!
...
2,173
Posted By forevertl
it works. thanks a lot! Lin
it works. thanks a lot!

Lin
Showing results 1 to 25 of 55

 
All times are GMT -4. The time now is 09:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy