Sponsored Content
Top Forums Shell Programming and Scripting Retrieve data from one file comparing the ID in the second file Post 302702277 by manigrover on Tuesday 18th of September 2012 05:21:42 AM
Old 09-18-2012
Thankyou

---------- Post updated at 04:21 AM ---------- Previous update was at 04:07 AM ----------

Hi Skrynesaver,

I am having a problem with the output. For every alternate record, the information is mising. An example of my output is given below. I do not have information for AC Q8IZP0. but it goes to the next record. This happens every alternate record.

Code:
ID   ABI1_HUMAN              Reviewed;         508 AA.
ID   ABI1_HUMAN              Reviewed;         508 AA.
AC   Q8IZP0; A9Z1Y6; B4DQ58; O15147; O76049; O95060; Q5T2R3; Q5T2R4;
ID   ABI3_HUMAN              Reviewed;         366 AA.
AC   Q9P2A4; C9IZN8; Q9H0P6;
DT   19-JUL-2004, integrated into UniProtKB/Swiss-Prot.
DT   18-MAY-2010, sequence version 2.
DT   05-SEP-2012, entry version 93.
DE   RecName: Full=ABI gene family member 3;
DE   AltName: Full=New molecule including SH3;
DE            Short=Nesh;
GN   Name=ABI3; Synonyms=NESH;

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Comparing data in file with values in table

Hi, I want to calculate the number of pipe delimiters in a file for all lines seperately. For eg:i have a file Project.txt Mohit|chawla|123|678 File1|File2|345|767|678 And my file contains many lines like this it shd give me the output as 4 5 or give me the output for all the... (0 Replies)
Discussion started by: Mohit623
0 Replies

2. Shell Programming and Scripting

Retrieve data from a file

Hello guys I want to retrieve two data from a file, like this: bash-2.03$ cat numtest 123456 123457 bash-2.03$ more ./test_num #!/bin/bash num1= num2= cnt=1 while read x do num${cnt}=$x cnt=$(($cnt+1)) done <$1 echo $num1 "\n" $num2 But when i executed this script, error... (2 Replies)
Discussion started by: tpltp
2 Replies

3. Shell Programming and Scripting

Comparing data inside file

Hi Everyone, I will try to explain my question please forgive my english here. I am looking for shell script or command that can compare data in the files. I have 50 files in one directory test1 test2 test3 ....so on. I want to compare data in each files with each other and output each... (4 Replies)
Discussion started by: email-lalit
4 Replies

4. Programming

to find header in Mp3 file and retrieve data

hi all, In an mp3 file , data is arranged in sequence of header and data ,how to retrieve data between two headers. Is the data between two headers fixed? because as per theory it says 1152 samples will be there , but dont knw how many bits one sample correspond to? it would help if any c... (2 Replies)
Discussion started by: shashi
2 Replies

5. UNIX for Advanced & Expert Users

Retrieve data and redirect to a file

How to write a shell script to retrieve datas from database after that this database are redirect to a excell sheet and then i got a mail that gives details about the database with the column name and data.. I m using oracle 9i... Thanks, Anup Das (2 Replies)
Discussion started by: anupdas
2 Replies

6. UNIX for Dummies Questions & Answers

Hot to retrieve *.sql file names which we refer in .sh file.

Hi Guys, How to retrieve/get *.sql file names which we refer in all *.sh files. Can any one help me on this. Thanks, Kolipaka (3 Replies)
Discussion started by: lakshmanrk811
3 Replies

7. UNIX for Dummies Questions & Answers

Mapping a data in a file and delete line in source file if data does not exist.

Hi Guys, Please help me with my problem here: I have a source file: 1212 23232 343434 ASAS1 4 3212 23232 343434 ASAS2 4 3234 23232 343434 QWQW1 4 1134 23232 343434 QWQW2 4 3212 23232 343434 QWQW3 4 and a mapping... (4 Replies)
Discussion started by: kokoro
4 Replies

8. Shell Programming and Scripting

Comparing Data file with Crtl file

Hi, I need to compare a file with its contents matching to that of another file(filename , received date and record count). Lets say has File A original data Ex - 1,abc,1234 2,bcd,4567 3,cde,8901 and File B has details of File A Ex- FILEA.TXT|06/17|2010|3 (filename)|(received... (18 Replies)
Discussion started by: Prashanth B
18 Replies

9. Shell Programming and Scripting

How can I retrieve the matching records from data file mentioned?

XYZNA0000778800Z 16123000012300321000000008000000000000000 16124000012300322000000007000000000000000 17234000012300323000000005000000000000000 17345000012300324000000004000000000000000 17456000012300325000000003000000000000000 9 XYZNA0000778900Z 16123000012300321000000008000000000000000... (8 Replies)
Discussion started by: later_troy
8 Replies

10. UNIX for Beginners Questions & Answers

Grep: Retrieve two strings from one file to find them anyone on line in another file

I am having trouble matching *two* strings from one file anywhere in a line of a second file, and could use some help getting this figured out. My preference would be to use grep for this because I would like to take advantage of its -A option. The latter is due to the fact that I would like both... (2 Replies)
Discussion started by: jvoot
2 Replies
SWISS::DEs(3pm) 					User Contributed Perl Documentation					   SWISS::DEs(3pm)

Name
       SWISS::DEs.pm

Description
       SWISS::DEs represents the DE lines of a UniProt Knowledgebase (Swiss-Prot + TrEMBL) entry as specified in the user manual
       http://www.expasy.org/sprot/userman.html.

       The DEs object basically holds lists of DE objects, each of them representing a protein name element.  The "elements", "hasFragment",
       "Includes" and "Contains" attributes/methods work as follows :

	DE   RecName: Full=CAD protein;
	DE	      Short=CAD;
	DE   AltName: Full=Protein rudimentary;
	DE   Includes:
	DE     RecName: Full=Glutamine-dependent carbamoyl-phosphate synthase;
	DE		EC=6.3.5.5;
	DE   Includes:
	DE     RecName: Full=Aspartate carbamoyltransferase;
	DE		EC=2.1.3.2;
	DE   Flags: Fragment;

	-= Entry::DEs =-
	elements (for each DE object, see SWISS::DE.pm documentation) :
	   toText:    "CAD protein",  "CAD",	   "Protein rudimentary"
	   category:  "RecName",      "RecName",   "AltName"
	   type:      "Full",	      "Short"	   "Full"
	hasFragment : "Fragment"
	Includes : ListBase of DEs (child1, child2)
	Contains : empty ListBase

	-= child1 =-
	elements (for each DE object) :
	   toText:    "Glutamine-dependent carbamoyl-
		       phosphate synthase",	       "6.3.5.5"
	   category:  "RecName",		       "RecName",
	   type:      "Full",			       "EC"
	hasFragment : undef

	-= child2 =-
	elements (for each DE object) :
	   toText:    "Aspartate carbamoyltransferase",  "2.1.3.2"
	   category:  "RecName",			 "RecName",
	   type:      "Full",				 "EC"
	hasFragment : undef

       Note: the old unstructured DE format can still be used, and will be parsed the same way into DE objects (but without setting their
       attributes 'category' and 'type'.

	DE   CAD protein (Protein rudimentary) [Includes: Glutamine-dependent
	DE   carbamoyl-phosphate synthase (EC 6.3.5.5); Aspartate
	DE   carbamoyltransferase (EC 2.1.3.2)] (Fragment).

Inherits from
       SWISS::ListBase.pm

Attributes
       "text"
	   The (raw) text of the DE line (without the 'DE   ' line type prefixes)

       "list"
	   Array reference to the SWISS::DE objects containing the different names for the entry. The first element of the list is the recommended
	   name.  Note: use "elements" method (inherited from ListBase) to get (and loop through) the array of DE objetcs.

       "Includes"
       "Contains"
	   Each of these is a SWISS::ListBase object whose list contains a SWISS::DEs object for each 'child' of the protein (i.e. peptide or
	   functional domain). See the UniProtKB user manual for an explanation. It is possible to have both Includes and Contains in a single
	   entry:

	    DE	 RecName: Full=Arginine biosynthesis bifunctional protein argJ;
	    DE	 Includes:
	    DE	   RecName: Full=Glutamate N-acetyltransferase;
	    DE		    EC=2.3.1.35;
	    DE	   AltName: Full=Ornithine acetyltransferase;
	    DE		    Short=OATase;
	    DE	   AltName: Full=Ornithine transacetylase;
	    DE	 Includes:
	    DE	   RecName: Full=Amino-acid acetyltransferase;
	    DE		    EC=2.3.1.1;
	    DE	   AltName: Full=N-acetylglutamate synthase;
	    DE		    Short=AGS;
	    DE	   RecName: Full=Arginine biosynthesis bifunctional protein argJ alpha chain;
	    DE	 Contains:
	    DE	   RecName: Full=Arginine biosynthesis bifunctional protein argJ beta chain;

       "hasFragment"
	   Contains 'Fragment' or 'Fragments' (evaluates to true) if the DE lines contain the 'Fragment(s)' indication (in 'Flags:' line with the
	   new DE line format), otherwise evaluates to false. Compare to the more robust Entry::isFragment which also checks the FT lines for a
	   NON_CONS or NON_TER.

       "isPrecursor"
	   Returns 1 if the flag 'Precursor' is present (undef if not). Note: only with new DE line format.

Methods
   Standard methods
       new
       fromText
       toText

Evidence Tags
       With the new DE line format, each DE element can have distinct evidence tags, which are stored in the DE object themself (see SWISS::DE.pm
       documentation).	The evidence tags for the 'Flags' line are stored in the parent DEs object itself.  With the old DE line format, since the
       DE line did not have a fixed syntax in TrEMBL, it is impossible to reliably assign evidence tags separately to the different elements of
       the DE lines. Therefore, the DE line can only be evidence tagged as a whole, and the following methods have their prototype defined in
       SWISS::BaseClass instead of the direct parent of SWISS::DEs, SWISS::ListBase :

	addEvidenceTag
	deleteEvidenceTags
	getEvidenceTags
	getEvidenceTagsString
	hasEvidenceTag
	setEvidenceTags

       example :

	$evidenceTag = $entry->Stars->EV->addEvidence('P', 'DEfix', '-', 'v1.3');
	# add global DE evtag if old DE line format, 'Flags' evtag if new format
	$entry -> DEs -> addEvidenceTag($evidenceTag);

perl v5.10.1							    2008-07-17							   SWISS::DEs(3pm)
All times are GMT -4. The time now is 07:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy