File 1 is a large reference sequence (A large Fasta sequence);
File 1 (is a file which first line is the header description and line other ">" is its corresponding word and counting from 1 till end of file);
File 2 is list of data that I interested to replace specific word at specific location in File 1;
File 2 (3 column in File 2 and is tab-delimited format);
Desired Output File
File 1 is a long record Fasta file (Include a first line of header description and line after ">" is its corresponding word).
File 2 is a file got 3 column (Tab-delimited).
First column is the header description (without ">") of File 1;
Second column is the position of word that I wanna to replace in File 1 based on Third column data;
Third column is the word that I wanna to replace it which specific word/specific position of File 1;
Awk code try
I would like to replace specific word (exclude header >Data_1) at specific location in File 1 if it is list on File 2 data.
My main objective is hope to replace specific word at specific location in File 1 based on the record provided in File 2 (specific position and replace with new word based on File 2).
Thanks for any advice.
Last edited by cpp_beginner; 07-31-2016 at 12:04 PM..
Reason: Corrected code tags.
----
Note: FS= (the extension that if FS is equal to the empty string, each character becomes a separate field) is not part of POSIX and may or may not work with your version of awk.
Gents,
If there the possibility can to extract data using a reference from other file.
input.txt ( big file which contends all data
output.txt ( data extracted )
selection.txt ( information to extract the data
Example
In file input.txt there is big data each record have 56 lines like... (3 Replies)
Gents,
Please can you help with this.
I have a big file (file2) which contends many records increment every 25 rows ( column 1 ).
Then I have other file as reference (file1).. column 1 to 11.
I want to compare that all values in file2 (column 2 to 12.) match with values in... (2 Replies)
Gents,
Can you please help me to solve this case
In my input file I have a values in column 49 which always need to be one, but sometimes the system create a value 2, in this case I need to go to search in the original file and replace the values in the row where the value 2 is and in the... (6 Replies)
Hello experts :cool:,
I am new to programming and will need your help.. I have 2 very large files with the following format:
FILE1:
>MLP1019 PL4
>MLP7456 PL3
>MLP9268 PL9
>MLP6245 PL1
FILE2:
>MLP1019
STNAPLQTSNTWVSYQPSMMMSLQ
>MLP7456
PPYWYWNSAVMIFYVQPLSLLAVLLA
>MLP9268... (2 Replies)
Dear All,
I have a master file - Master.txt
100|ABC
200|CED
500|XYZ
800|POL
I have a reference file - Ref.txt
200
800
What is desired..
Check for all those records in reference file matching with those within master file and then delete those records from Master file
So, at end,... (1 Reply)
Hi Guys,
i have two files:
fileA:
20090611 00:00:11
20090611 00:00:11
20090611 00:00:24
20090611 00:01:10
20090611 07:13:00
fileB:
20090611 00:00:01
20090611 00:00:12
20090611 00:00:24
20090611 00:01:12
20090611 09:13:00
want to make two files into a single file, but follow the... (14 Replies)
I have data like the following pattern:
<change date="2000-01-09" who="#OUCS">Updated all catrefs</change>
<change date="2000-01-08" who="#OUCS">Manually updated tagcounts, titlestmt, and title in source</change>
<change date="1999-09-13" who="#UCREL">POS codes revised for BNC-2; header... (14 Replies)