and this:
Basically, all of the SNP-values are 0,1, 2 or NA, and they each have a score, listed in the second file. The total number of SNP-values are approx 70, so file one has 71 columns and approx 1000 rows, and file 2 has 2 columns and 71 rows.
I would like a script that for each row in file 1, takes the value of SNP1 and multiplies by the score of SNP1, creating a new colum for this sum, like this:
The NA is an indicator of missing data and can be changed into a numerical if needed, but it needs to be distinctly separated from 0, so maybe -9 would work.
I've tried creating a new file which looks like this:
and running this awk script:
but it doesn't work, it only gives one output colum, which is usually S2*$6 (I think).
Hi,
I have list of files present in a folder. I want to search for a particular keyword sequentially and create a file which will be later used by some other program.
Input files:
$ ls
a.dsx b.dsx c.dsx Dataline_.txt Dataline.txt loop.sh
$ cat *.dsx
help
tyiis
global
for i in... (4 Replies)
Hello Unix experts,
I need a help to create a subset file. I know with cut comand, its very easy to select many different columns, or threshold. But here I have a bit problem as in my data file is big. And I don't want to identify the column numbers or names manually. I am trying to find any... (7 Replies)
Hi, I am trying to multiply column#1 with column#2 using a shell script. How can I make a for-loop script using 1st column as "i" and the second column as "j" from the following file? Please feel free to share any alternative ways to multiplying column#1 with column#2.
.06 5.0000
.49 ... (6 Replies)
i have a file 'detail' which contains
cat detail
111111
222222
333333
444444
but detail may be 4 line file.6 line file or 8 line file like
cat detail
111111
222222
333333
444444
555555
666666
777777
888888
so i want a declare a loop which assign the value of first line in one... (11 Replies)
I have a list below, how can I have things separated nicely in columns
mv browseDir.tcsh browseDir.csh
mv checkSRDist.tcsh checkSRDist.csh
mv create-data-tinv.tcsh create-data-tinv.csh
mv createDocs.tcsh createDocs.csh
mv createMisfit.tcsh createMisfit.csh
mv createModel.tcsh... (4 Replies)
Hi all
I'm having a few issues with sorting some data into easily-readable columns.
Original data in file:
Number of visits IP Address
8 244.44.145.122
8 234.45.165.125
6 225.107.26.10
I firstly tried the column -t command which results in this:
Number of ... (4 Replies)
I have the following code and want to use a loop to output the results to the fparams file.
if ($optparams == 1) then
# Set the tdarwin parameters
set txt01 = "Call to raytrac.csh"
set txt02 = ""
set txt03 = "./Scripts/raytrac.csh $*"
set txt04 = ""
set txt05 =... (0 Replies)
I have 3 variables with different information.. they look like this (row-wise aswell):
Variable1 =
Roland
Kalle
Dalius
Variable2 =
ake123
ler321
kaf434
Variable3 =
Richardsen
Sworden
Lokthar
How can I sort them by variable3 alphabetical and add them into the same output so... (0 Replies)
Hi Guyz
I designed a script that can compare 2 columns(values) of single file and gives the closest numbers to the first column by comparing the numbers in first column with second and it works in a single file.
Now I'm trying to design a new script with 2 objectives for 2 files (not a single... (4 Replies)