Sponsored Content
Top Forums Shell Programming and Scripting Match look up file and find result Post 302698537 by manigrover on Monday 10th of September 2012 08:29:14 AM
Old 09-10-2012
Request to check

Hi Raj

Thanks for reply.

It s giving correct results but the only issue is as u said the spacing between .

So when I am trying to paste result in excel the spacing between words being separated into columns like

below data contain 9 or morecolumns but it should come in just 6 columns
For example:
for first row:

1 column for CHRM1
2 column for P1129
3 xolumn for Pirenzepine
4 column for DAP000492
5 column for Peptic ulcer disease( not 3 different columns)
6 column for approved

Code:
CHRM1    P11229    Pirenzepine    DAP000492    Peptic ulcer disease    Approved 
CHRM1    P11229    Glycopyrrolate    DAP001116    Anesthetic    Approved 
CHRM1    P11229    Clidinium    DAP001117    Abdominal/stomach pain    Approved 
CHRM1    P11229    Dicyclomine    DAP001118    Irritable bowel syndrome    Approved 
CHRM1    P11229    Ethopropazine    DAP001119    Parkinson's disease    Approved 
CHRM1    P11229    Cycrimine    DAP001120    Parkinson's disease    Approved 
CHRM1    P11229    Benztropine    DAP001121    Parkinson's disease    Approved 
CHRM1    P11229    Trihexyphenidyl    DAP001122    Parkinson's disease    Approved 
CHRM1    P11229    Propantheline    DAP001123    Excessive sweating (hyperhidrosis)    Approved 
CHRM1    P11229    Oxyphenonium    DAP001124    Spasm    Approved 
CHRM1    P11229    Biperiden    DAP001125    Parkinson's disease    Approved 
CHRM1    P11229    Talsaclidine isomer    DCL000268    Alzheimer's disease    Discontinued 
CHRM1    P11229    Sabcomeline hydrochloride    DCL000279    Cardiovascular diseases    Phase IIa 
CHRM1    P11229    Talsaclidine fumarate    DCL000303    Alzheimer's disease    Discontinued 
CHRM1    P11229    Xanomeline tartrate    DCL000328    Alzheimer's disease    Phase II 
CHRM1    P11229    GSK573719    DCL000381    Chronic Obstructive Pulmonary Disease (COPD)    Phase II 
CHRM1    P11229    GSK961081    DCL000397    Chronic Obstructive Pulmonary Disease (COPD)    Phase II completed 
CHRM1    P11229    GSK1034702    DCL000402    Schizophrenia, Dementia    Phase I completed 
CHRM1    P11229    Darotropium    DCL000514    COPD    Suspended in Phase II in GSK 2009 Report 
CHRM1    P11229    Darotropium + 642444    DCL000515    COPD    Phase III 
CHRM1    P11229    Revatropate    DCL000957    Chronic obstructive pulmonary disease    Discontinued in Phase I

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

result of find

Hey, I am using 'find' to check the existence of a file which is created today, and this is what I have find . -name $filename -mtime +0 -exec ls {} \; my problem is I need to know what the above command actually get anything, so can anyone give me some pointer on how to do... (1 Reply)
Discussion started by: mpang_
1 Replies

2. Shell Programming and Scripting

Outputting formatted Result log file from old 30000 lines result log<help required>

Well I have a 3000 lines result log file that contains all the machine data when it does the testing... It has 3 different section that i am intrsted in 1) starting with "20071126 11:11:11 Machine Header 1" 1000 lines... "End machine header 1" 2) starting with "20071126 12:12:12 Machine... (5 Replies)
Discussion started by: vikas.iet
5 Replies

3. Shell Programming and Scripting

Find match in two diff file - local srv and remote server

Perl Guru.... I need to compare two diff file (file1.abc will locate in current server and file2.abc will locate in remote server), basically the script will look for match in both file and only will send out email if there is no match and also give me list of unmatch and dups as well. So... (0 Replies)
Discussion started by: amir07
0 Replies

4. Shell Programming and Scripting

How to find first match and last match in a file

Hi All, I have a below file: ================== 02:53 pravin-root 02:53 pravin-root 03:05 pravin-root 02:55 pravin1-root 02:59 pravin1-root ================== How do I find the first and last value of column 1. For example, how do I find 02:53 is the first time stamp and 03:05 is... (3 Replies)
Discussion started by: praving5
3 Replies

5. UNIX Desktop Questions & Answers

find result

When searching for some files which match some specific criteria with find from the root directory, I got a listing of a bunch of files that say "Permission Denied". How can do my search and not show the files that I don't have the permission to list? Thanks, (3 Replies)
Discussion started by: Pouchie1
3 Replies

6. Shell Programming and Scripting

Find diff bet 2 files and store result in another file

Hi I want to compare 2 files. The files have the same amount of rows and columns. So each line must be compare against the other and if one differs from the other, the result of both must be stored in a seperate file. I am doing this in awk. Here is my file1: Blocks... (2 Replies)
Discussion started by: ladyAnne
2 Replies

7. Shell Programming and Scripting

Compare two files and find match and print the header of the second file

Hi, I have two input files; file1 and file2. I compare them based on matched values in 1 column and print selected columns of the second file (file2). I got the result but the header was not printed. i want the header of file2 to be printed together with the result. Then i did below codes:- ... (3 Replies)
Discussion started by: redse171
3 Replies

8. Shell Programming and Scripting

awk parse result that match data from file

i run command that return this result,example : gigabitethernet2/2/4:NotPresent, gigabitethernet2/1/17:UP, gigabitethernet2/1/10:UP, gigabitethernet2/1/5:UP, gigabitethernet2/1/9:UP, gigabitethernet2/1/36:DOWN, gigabitethernet2/1/33:DOWN, gigabitethernet2/1/8:UP,... (19 Replies)
Discussion started by: wanttolearn1
19 Replies

9. UNIX for Beginners Questions & Answers

Match file and find count

Hi All, I have transaction in one file.I want to match that to another file and find the number of time the transaction is available on the other file.I need to take each record from TRANSFILE and match that with SPEND FILE and find the number of counts of the transaction TRANSFILE: ... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

10. UNIX for Beginners Questions & Answers

How to find particular file-name in file and get result in table in mail?

We have 100 linux servers, All send logs to both centralize server(server1 and serverb). all send logs every day and stores in /syslog folder with hostname.log file. I need to prepare script to check every day from both centralize server(server1 and serverb) and send mail in table format. ... (1 Reply)
Discussion started by: yash_message
1 Replies
Bio::SeqFeature::AnnotationAdaptor(3pm) 		User Contributed Perl Documentation		   Bio::SeqFeature::AnnotationAdaptor(3pm)

NAME
Bio::SeqFeature::AnnotationAdaptor - integrates SeqFeatureIs annotation SYNOPSIS
use Bio::SeqFeature::Generic; use Bio::SeqFeature::AnnotationAdaptor; # obtain a SeqFeatureI implementing object somehow my $feat = Bio::SeqFeature::Generic->new(-start => 10, -end => 20); # add tag/value annotation $feat->add_tag_value("mytag", "value of tag mytag"); $feat->add_tag_value("mytag", "another value of tag mytag"); # Bio::SeqFeature::Generic also provides annotation(), which returns a # Bio::AnnotationCollectionI compliant object $feat->annotation->add_Annotation("dbxref", $dblink); # to integrate tag/value annotation with AnnotationCollectionI # annotation, use this adaptor, which also implements # Bio::AnnotationCollectionI my $anncoll = Bio::SeqFeature::AnnotationAdaptor->new(-feature => $feat); # this will now return tag/value pairs as # Bio::Annotation::SimpleValue objects my @anns = $anncoll->get_Annotations("mytag"); # other added before annotation is available too my @dblinks = $anncoll->get_Annotations("dbxref"); # also supports transparent adding of tag/value pairs in # Bio::AnnotationI flavor my $tagval = Bio::Annotation::SimpleValue->new(-value => "some value", -tagname => "some tag"); $anncoll->add_Annotation($tagval); # this is now also available from the feature's tag/value system my @vals = $feat->each_tag_value("some tag"); DESCRIPTION
Bio::SeqFeatureI defines light-weight annotation of features through tag/value pairs. Conversely, Bio::AnnotationCollectionI together with Bio::AnnotationI defines an annotation bag, which is better typed, but more heavy-weight because it contains every single piece of annotation as objects. The frequently used base implementation of Bio::SeqFeatureI, Bio::SeqFeature::Generic, defines an additional slot for AnnotationCollectionI-compliant annotation. This adaptor provides a Bio::AnnotationCollectionI compliant, unified, and integrated view on the annotation of Bio::SeqFeatureI objects, including tag/value pairs, and annotation through the annotation() method, if the object supports it. Code using this adaptor does not need to worry about the different ways of possibly annotating a SeqFeatureI object, but can instead assume that it strictly follows the AnnotationCollectionI scheme. The price to pay is that retrieving and adding annotation will always use objects instead of light-weight tag/value pairs. In other words, this adaptor allows us to keep the best of both worlds. If you create tens of thousands of feature objects, and your only annotation is tag/value pairs, you are best off using the features' native tag/value system. If you create a smaller number of features, but with rich and typed annotation mixed with tag/value pairs, this adaptor may be for you. Since its implementation is by double- composition, you only need to create one instance of the adaptor. In order to transparently annotate a feature object, set the feature using the feature() method. Every annotation you add will be added to the feature object, and hence will not be lost when you set feature() to the next object. 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 - Hilmar Lapp Email hlapp at gmx.net APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ new Title : new Usage : my $obj = Bio::SeqFeature::AnnotationAdaptor->new(); Function: Builds a new Bio::SeqFeature::AnnotationAdaptor object Returns : an instance of Bio::SeqFeature::AnnotationAdaptor Args : Named parameters -feature the Bio::SeqFeatureI implementing object to adapt (mandatory to be passed here, or set via feature() before calling other methods) -annotation the Bio::AnnotationCollectionI implementing object for storing richer annotation (this will default to the $feature->annotation() if it supports it) -tagvalue_factory the object factory to use for creating tag/value pair representing objects feature Title : feature Usage : $obj->feature($newval) Function: Get/set the feature that this object adapts to an AnnotationCollectionI. Example : Returns : value of feature (a Bio::SeqFeatureI compliant object) Args : new value (a Bio::SeqFeatureI compliant object, optional) annotation Title : annotation Usage : $obj->annotation($newval) Function: Get/set the AnnotationCollectionI implementing object used by this adaptor to store additional annotation that cannot be stored by the SeqFeatureI itself. If requested before having been set, the value will default to the annotation object of the feature if it has one. Example : Returns : value of annotation (a Bio::AnnotationCollectionI compliant object) Args : new value (a Bio::AnnotationCollectionI compliant object, optional) AnnotationCollectionI implementing methods get_all_annotation_keys Title : get_all_annotation_keys Usage : $ac->get_all_annotation_keys() Function: gives back a list of annotation keys, which are simple text strings Returns : list of strings Args : none get_Annotations Title : get_Annotations Usage : my @annotations = $collection->get_Annotations('key') Function: Retrieves all the Bio::AnnotationI objects for a specific key Returns : list of Bio::AnnotationI - empty if no objects stored for a key Args : string which is key for annotations get_num_of_annotations Title : get_num_of_annotations Usage : my $count = $collection->get_num_of_annotations() Function: Returns the count of all annotations stored in this collection Returns : integer Args : none Implementation specific functions - to allow adding add_Annotation Title : add_Annotation Usage : $self->add_Annotation('reference',$object); $self->add_Annotation($object,'Bio::MyInterface::DiseaseI'); $self->add_Annotation($object); $self->add_Annotation('disease',$object,'Bio::MyInterface::DiseaseI'); Function: Adds an annotation for a specific key. If the key is omitted, the object to be added must provide a value via its tagname(). If the archetype is provided, this and future objects added under that tag have to comply with the archetype and will be rejected otherwise. This implementation will add all Bio::Annotation::SimpleValue objects to the adapted features as tag/value pairs. Caveat: this may potentially result in information loss if a derived object is supplied. Returns : none Args : annotation key ('disease', 'dblink', ...) object to store (must be Bio::AnnotationI compliant) [optional] object archetype to map future storage of object of these types to remove_Annotations Title : remove_Annotations Usage : Function: Remove the annotations for the specified key from this collection. If the key happens to be a tag, then the tag is removed from the feature. Example : Returns : an array Bio::AnnotationI compliant objects which were stored under the given key(s) Args : the key(s) (tag name(s), one or more strings) for which to remove annotations (optional; if none given, flushes all annotations) Additional methods tagvalue_object_factory Title : tagvalue_object_factory Usage : $obj->tagval_object_factory($newval) Function: Get/set the object factory to use for creating objects that represent tag/value pairs (e.g., Bio::Annotation::SimpleValue). The object to be created is expected to follow Bio::Annotation::SimpleValue in terms of supported arguments at creation time, and the methods. Example : Returns : A Bio::Factory::ObjectFactoryI compliant object Args : new value (a Bio::Factory::ObjectFactoryI compliant object, optional) perl v5.14.2 2012-03-02 Bio::SeqFeature::AnnotationAdaptor(3pm)
All times are GMT -4. The time now is 07:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy