Sponsored Content
Top Forums Shell Programming and Scripting Collecting header from another file Post 302881734 by ritakadm on Tuesday 31st of December 2013 01:19:49 PM
Old 12-31-2013
Collecting header from another file

I want to add header description from a file by matching the 2nd col of another file. .

The lookup file is at

ftp://ftp.ncbi.nlm.nih.gov/pub/COG/KOG/kog

The table file looks like

Code:
comp1001565_c0_seq1     At1g14590       48.48   66      34      0       200     3       171     236     2e-16   82.8
comp10017_c0_seq1       Hs20533698      34.52   84      55      1       15      266     58      139     1e-07   53.1

So the two rows have 2nd cols as At1g14590 and Hs20533698.

At1g14590 is not found in the lookup file but Hs20533698 is classified under
[U] KOG0811 SNARE protein PEP12/VAM3/Syntaxin 7/Syntaxin 17 in
the lookup file.

desired output

Code:
comp1001565_c0_seq1     At1g14590       48.48   66      34      0       200     3       171     236     2e-16   82.8
comp10017_c0_seq1       Hs20533698      34.52   84      55      1       15      266     58      139     1e-07   53.1     [U] KOG0811 SNARE protein PEP12/VAM3/Syntaxin 7/Syntaxin 17

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Collecting data from TOP to a file

Is there a way to collect data from top command to a file at regular intervals. I need this on HP-UX. I need to gather resident memory usage. I know that sar will give %cpu usage. There is a pmap command which gives memory usage in solaris. Is there a similar command in HP-UX Thanks (5 Replies)
Discussion started by: sssow
5 Replies

2. Shell Programming and Scripting

Need Help: Collecting similar messages in a file

Hi All, Since i am very new to shell scripting, i need help from you guys. Suppose there is a file containing: Log message: Ashish "asasasa" asasa asasa asasas.info1 Log message: Kapil "asasasa" asasa asasa asasas..info1 (2 Replies)
Discussion started by: ashish.kapil
2 Replies

3. Linux

Reading the header of a tar file(posix header)

say i have these many file in a directory named exam. 1)/exam/newfolder/link.txt. 2)/exam/newfolder1/ and i create a tar say exam.tar well the problem is, when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories. on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies

4. Shell Programming and Scripting

Collecting specific portion from a file

I have a file which contains data like a b x col1:data1 formula:data3 this is for 2 a c col1:@bkw formula:dontad ad asd as per a \ i want the data from col1 and formula to keep the col1 data in left side of excel and col2 data in right side of it (1 Reply)
Discussion started by: bmrout007
1 Replies

5. Shell Programming and Scripting

Renaming all header to specific header pattern

Input #HAC0253 EFVHIJHIJEFVTHIJOPKOPKTEFVEFVEFVOPKHIJOPKOPKHIJTTEFVEFVTEFV #BASFS12 EFVEFVHIJEFVEFVTOPKEFVOPKTHIJTTHIJOPK #ACG5115 TEFVEFVOIJEFVHIJHIJOPKOPKHIJHIJTTEFVEFVOPKTTEFVEFVOPKHIJOPKOPKOPK #ECG5114 IJTOPKHIJEFVOEFVEFVOPKTTEFVEFVOPKHIJOPKOPKOPK . . Output (5 Replies)
Discussion started by: patrick87
5 Replies

6. Shell Programming and Scripting

Collecting details

Hi all, I am having lots of oracle servers. I want to collect some health check details from all the server and report to one single centralized server. What would be best solution for this? OS: AIX Thanks Gopal (1 Reply)
Discussion started by: ilugopal
1 Replies

7. Shell Programming and Scripting

Comparing one file header with another file header

Hi Experts, In our project we have requirement where in we have to compare header of one file with header in the parameter file. There are 20 files which we ftp from one site. All this files have different header. We are comapring this file with our parameter file(which is having the header... (2 Replies)
Discussion started by: Amey Joshi
2 Replies

8. UNIX for Dummies Questions & Answers

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

Friends, I need help with the following in UNIX. Merge all csv files in one folder considering only 1 header row and ignoring header of all other files. FYI - All files are in same format and contains same headers. Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies

9. Shell Programming and Scripting

Manipulate all rows except header, but header should be output as well

Hello There... I have a sample input file .. number:department:amount 125:Market:125.23 126:Hardware store:434.95 127:Video store:7.45 128:Book store:14.32 129:Gasolline:16.10 I will be doing some manipulations on all the records except the header, but the header should always be... (2 Replies)
Discussion started by: juzz4fun
2 Replies

10. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
Bio::FeatureIO::ptt(3pm)				User Contributed Perl Documentation				  Bio::FeatureIO::ptt(3pm)

NAME
Bio::FeatureIO::ptt - read/write features in PTT format SYNOPSIS
# read features my $fin = Bio::FeatureIO->new(-file=>'genes.ptt', -format=>'ptt'); my @cds; while (my $f = $fin->next_feature) { push @cds, $f if $f->strand > 0; } # write features (NOT IMPLEMENTED) my $fout = Bio::FeatureIO->new(-fh=>*STDOUT, -format=>'ptt'); for my $f (@cds) { $fout->write_feature($f); } DESCRIPTION
The PTT file format is a table of protein features. It is used mainly by NCBI who produce PTT files for all their published genomes found in <ftp://ftp.ncbi.nih.gov/genomes/>. It has the following format: Line 1 Description of sequence to which the features belong eg. "Leptospira interrogans chromosome II, complete sequence - 0..358943" It is usually equivalent to the DEFINITION line of a Genbank file, with the length of the sequence appended. It is unclear why "0" is used as a starting range, it should be "1". Line 2 Number of feature lines in the table eg. "367 proteins" Line 3 Column headers, tab separated eg. "Location Strand Length PID Gene Synonym Code COG Product" Location : "begin..end" span of feature Strand : "+" or "-" Length : number of amino acids excluding the stop codon PID : analogous to Genbank /db_xref="GI:xxxxxxxxx" Gene : analogous to Genbank /gene="xxxx" Synonym : analogous to Genbank /locus_tag="xxxx" Synonym : analogous to Genbank /locus_tag="xxxx" COG : CDD COG code with COG letter categories appended Product : analogous to Genbank /product="xxxx" Line 4 onwards Feature lines, nine columns, tab separated, "-" used for empty fields eg. "2491..3423 + 310 24217063 metF LB002 - COG0685E 5,10-methylenetetrahydrofolate reductase" FEEDBACK
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Support Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web: https://redmine.open-bio.org/projects/bioperl/ AUTHOR - Torsten Seemann Email torsten.seemann AT infotech.monash.edu.au CONTRIBUTORS
Based on bed.pm and gff.pm by Allen Day. APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ _initialize Title : _initialize Function: Reading? parses the header of the input Writing? next_feature Title : next_feature Usage : $io->next_feature() Function: read the next feature from the PTT file Example : Args : Returns : Bio::SeqFeatureI object write_feature (NOT IMPLEMENTED) Title : write_feature Usage : $io->write_feature($feature) Function: write a Bio::SeqFeatureI object in PTT format Example : Args : Bio::SeqFeatureI object Returns : description Title : description Usage : $obj->description($newval) Function: set/get the PTT file description for/from line one Example : Returns : value of description (a scalar) Args : on set, new value (a scalar or undef, optional) protein_count Title : protein_count Usage : $obj->protein_count($newval) Function: set/get the PTT protein count for/from line two Example : Args : on set, new value (a scalar or undef, optional) Returns : value of protein_count (a scalar) perl v5.14.2 2012-03-02 Bio::FeatureIO::ptt(3pm)
All times are GMT -4. The time now is 11:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy