Search Results

Search: Posts Made By: auburn
5,604
Posted By auburn
How to make a distance matrix
Hi,

I'm trying to generate a distance matrix between sample pairs for use in a tree-drawing program (example below). The example below demonstrates what I'd like to get out of the data -...
5,622
Posted By auburn
Thanks!! No, this isn't homework. I'm actually...
Thanks!!
No, this isn't homework. I'm actually a unix-naive scientist and I have some huge genetic data files which I'm trying to convert into more manageable files which I can analyse in R. I'm...
5,622
Posted By auburn
How to calculate the percentage/fraction of each value in a row against the maximum row value?
Hi,

For each row in a file, i would like to identify the maximum value and calculate the percentage/fraction of the max for other values in the row.
Then, I would like to print a copy of the file...
1,897
Posted By auburn
Great! Thank you!
Great! Thank you!
1,897
Posted By auburn
Works, thank you!! Sorry to ask, but If you...
Works, thank you!!
Sorry to ask, but If you have a few mins spare, would it be possible to write a few brief notes on what the commands do? Still trying to work out how do arrays... If no time, no...
1,897
Posted By auburn
How to assign scores to rows based on column values
Hi,

I'm trying to assign a score to each row which will allow me to identify which rows differ. In the example file below, I've used "," to indicate column separators (my actual file has tab...
4,151
Posted By auburn
Hi, Silly mistake on my end! I used "," in...
Hi,

Silly mistake on my end! I used "," in the example file posted to show column separators but in my actual file, columns are separated by tabs... Do I need to replace "," with "\t"?
Thanks and...
4,151
Posted By auburn
Yes, I used the whole command line exactly as...
Yes, I used the whole command line exactly as written. Not sure why it didn't work...
4,151
Posted By auburn
Hi, Unfortuantely, my output with this...
Hi,

Unfortuantely, my output with this command is just "0,,"
I also tried gawk instead of awk but got the same results.
Any advice?

Thanks!
4,151
Posted By auburn
How to sum rows in e.g. column 1 by a category in e.g. column 2
Hi,

I've shown an example of what I would like to achieve below. In the example file, I would like to sum the values in column 2 for each distinct category in column 3 (presumably making an...
7,298
Posted By auburn
Thanks for your help! Sorry for delayed reply. ...
Thanks for your help! Sorry for delayed reply.
The real file that I'm working from is pretty big (over 20 million rows) and the max value is about 10,000. Is there a quick way to generate the...
7,298
Posted By auburn
How to calculate frequency distributions?
Hello,

I'm trying to get lists of the frequency distributions for each of two variables (vars C and N in the examples). I'd like the distribution for each variable to range from the min of the...
25,201
Posted By auburn
Thank you, very helpful!:)
Thank you, very helpful!:)
25,201
Posted By auburn
Sort 2 columns numerically
Hi,

A basic query. In the example file below, I want to sort by column 1 and then by column 2 numerically. I have tried sort -k2n,1 file1 but while this sorts the columns in the correct order, it...
2,857
Posted By auburn
Thank you, this is very helpful! Cheers :)
Thank you, this is very helpful!

Cheers :)
14,660
Posted By auburn
Thanks everyone!
Thanks everyone!
14,660
Posted By auburn
How to remove a string from a specific column in a file
Hello,
A basic query. How can I remove a string from a specific column.
For example, remove "abcd" just from column 2 in example file:

abcd abcd1
abcd abcd2
abcd abcd3

to get output:
...
2,857
Posted By auburn
Beautiful! Works perfectly. If you have time,...
Beautiful! Works perfectly.
If you have time, would it be possible to post a few notes on what each line does? Just for learning...
Thank you!:)
2,857
Posted By auburn
How to match 2 columns where one column has data as a range
Hi,

I have a query about joining files using data ranges.
Example files below - I want to join file1 to file2 with matches where file1 column 1 is equal to file2 column1, and file1 column 2 is...
Showing results 1 to 19 of 19

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