Search Results

Search: Posts Made By: jamessmith01
5,267
Posted By jamessmith01
The files are very large so I have posted some...
The files are very large so I have posted some lines from them.

file 1:
chr1 protein_coding exon 2256218 2256307 1 + . gene_id "ENSRNOG00000014303"; transcript_id "ENSRNOT00000019181";...
5,267
Posted By jamessmith01
Tested and it works perfectly, great. Please...
Tested and it works perfectly, great.

Please can you tell me how I would apply this code to my specific dataset?

Here is a sample from my file2. I would like to match on fields 1 and 4 ("chr1"...
5,267
Posted By jamessmith01
Hi pravin27, Thanks for the code. edit:...
Hi pravin27,

Thanks for the code.

edit: sorry I think I was wrong, hold on while I check this...

---------- Post updated at 01:30 PM ---------- Previous update was at 01:18 PM ----------
...
5,267
Posted By jamessmith01
I want to keep the data from file1 in a separate...
I want to keep the data from file1 in a separate field to data from file2, so I know where the data in those fields came from.

E.g. in context:

file1:
Chromosome Gene Level
Chr1 Abbb 13
Chr4...
5,267
Posted By jamessmith01
Output from radoulov's code: 1 A X a Y b 4...
Output from radoulov's code:

1 A X a Y b
4 D X d X d
5 E Y e Y e
2 C Z c Z c
3 D X d X d
6 A X b
4 E Y e

It seems to have missed out lines from file1:
2 B Y b
3 C Z c
1 A Y b

Output...
5,267
Posted By jamessmith01
I want to add two columns from file2 to matching...
I want to add two columns from file2 to matching lines from file1.

If there is no match for a line in file2, I need that line to be added to the bottom of file1.

So it would be something like: ...
5,267
Posted By jamessmith01
Hi pravin27, I tried your code with the...
Hi pravin27,

I tried your code with the following inputs:

file1
1 A X a
2 B Y b
3 C Z c
4 D X d
5 E Y e
1 A Y b
2 C Z c
3 D X d

file2
1 A Y b
2 C Z c
3 D X d
4 E Y e
5 E Z c
5,267
Posted By jamessmith01
Thanks very much for your replies. I'm using...
Thanks very much for your replies.

I'm using Fedora, will this run the Gawk program okay?

Also what would I need to add to the code to say, "if a line from file2 doesn't match a line from file1...
5,267
Posted By jamessmith01
Match data based on two fields, and append to a line
I need to write a program to do something like a 'vlookup' in excel. I want to match data from file2 based on two fields (where both match) in file1, and for matching lines, add the data from two of...
Showing results 1 to 9 of 9

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