Sponsored Content
Full Discussion: subsetting data
Top Forums UNIX for Dummies Questions & Answers subsetting data Post 302410004 by jdhahbi on Saturday 3rd of April 2010 04:56:35 PM
Old 04-03-2010
Quote:
Originally Posted by drl
Hi.

Observations:

1) there was no "chr10", "chr11" in your sample data set.

2) Your pattern file includes the 3 characters "chr1" on one of the lines. Where do you think a space should placed?

Best wishes ... cheers, drl
Hi drl

I used a different file in which the lines start like this:
chr1_1 strand.....
chr17_498 strand.....
chr2_0 strand.....
chr17_48 strand.....

the space is before 'strand'

I really appreciate your help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Howto capture data from rs232port andpull data into oracle database-9i automatically

Hi, i willbe very much grateful to u if u help me out.. if i simply connect pbx machine to printer by serial port RS232 then we find this view: But i want to capture this data into database automatically when the pbx is running.The table in database will contain similar to this view inthe... (1 Reply)
Discussion started by: boss
1 Replies

2. Shell Programming and Scripting

how to verify that copied data to remote system is identical with local data.

I have created simple shell script #!/bin/sh echo `date`; echo "Start .... find . -mtime +95 -print > /tmp/files.txt for file in `cat /tmp/files.txt` do echo "copying file - $file" /usr/local/bin/scp -p -P 2222 $file remote.hostname:/file/path echo "copid file -... (3 Replies)
Discussion started by: ynilesh
3 Replies

3. UNIX for Dummies Questions & Answers

subsetting data

I have a file where the data is stored in 6 columns, I would like to subset only lines with the fourth column is blank. Can anybody help me with this? Thanks Joseph (19 Replies)
Discussion started by: jdhahbi
19 Replies

4. Shell Programming and Scripting

subsetting lines with grep

Hi my file has two columns: GAII_4:6:100:548:645/1 GTACACAACCCCCCCCCCCCACCCCACCCCCCCCCCCCCC GAII_4:6:100:1:1242/1 AGTCTGCCCCTCCCCCTNNNNNNNTCTTTTNCCTCCTCCT GAII_4:6:100:444:504/1 GTAACACACACCCTGATACTCCCCCCTCCACAACCGCTCT I want to subset the lines that start with GT in the second column... (5 Replies)
Discussion started by: jdhahbi
5 Replies

5. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

6. UNIX for Dummies Questions & Answers

How to get data only inside polygon created by points which is part of whole data from file?

hiii, Help me out..i have a huge set of data stored in a file.This file has has 2 columns which is latitude & longitude of a region. Now i have a program which asks for the number of points & based on this number it asks the user to enter that latitude & longitude values which are in the same... (7 Replies)
Discussion started by: reva
7 Replies

7. Shell Programming and Scripting

Converting variable space width data into CSV data in bash

Hi All, I was wondering how I can convert each line in an input file where fields are separated by variable width spaces into a CSV file. Below is the scenario what I am looking for. My Input data in inputfile.txt 19 15657 15685 Sr2dReader 107.88 105.51... (4 Replies)
Discussion started by: vharsha
4 Replies

8. Shell Programming and Scripting

Generate tabular data based on a column value from an existing data file

Hi, I have a data file with : 01/28/2012,1,1,98995 01/28/2012,1,2,7195 01/29/2012,1,1,98995 01/29/2012,1,2,7195 01/30/2012,1,1,98896 01/30/2012,1,2,7083 01/31/2012,1,1,98896 01/31/2012,1,2,7083 02/01/2012,1,1,98896 02/01/2012,1,2,7083 02/02/2012,1,1,98899 02/02/2012,1,2,7083 I... (1 Reply)
Discussion started by: himanish
1 Replies

9. Shell Programming and Scripting

Parsing XML (and insert data) then output data (bash / Solaris)

Hi folks I have a script I wrote that basically parses a bunch of config and xml files works out were to add in the new content then spits out the data into a new file. It all works - apart from the xml and config file format in the new file with XML files the original XML (that ends up in... (2 Replies)
Discussion started by: dfinch
2 Replies

10. Shell Programming and Scripting

awk --> math-operation in data-record and joining with second file data

Hi! I have a pretty complex job - at least for me! i have two csv-files with meassurement-data: fileA ...... (2 Replies)
Discussion started by: IMPe
2 Replies
Bio::SeqFeature::FeaturePair(3pm)			User Contributed Perl Documentation			 Bio::SeqFeature::FeaturePair(3pm)

NAME
Bio::SeqFeature::FeaturePair - hold pair feature information e.g. blast hits SYNOPSIS
my $feat = Bio::SeqFeature::FeaturePair->new(-feature1 => $f1, -feature2 => $f2, ); # Bio::SeqFeatureI methods can be used my $start = $feat->start; my $end = $feat->end; # Bio::FeaturePair methods can be used my $hstart = $feat->hstart; my $hend = $feat->hend; my $feature1 = $feat->feature1; # returns feature1 object DESCRIPTION
A sequence feature object where the feature is itself a feature on another sequence - e.g. a blast hit where residues 1-40 of a protein sequence SW:HBA_HUMAN has hit to bases 100 - 220 on a genomic sequence HS120G22. The genomic sequence coordinates are used to create one sequence feature $f1 and the protein coordinates are used to create feature $f2. A FeaturePair object can then be made my $fp = Bio::SeqFeature::FeaturePair->new(-feature1 => $f1, # genomic -feature2 => $f2, # protein ); This object can be used as a standard Bio::SeqFeatureI in which case my $gstart = $fp->start # returns start coord on feature1 - genomic seq. my $gend = $fp->end # returns end coord on feature1. In general standard Bio::SeqFeatureI method calls return information in feature1. Data in the feature 2 object are generally obtained using the standard methods prefixed by h (for hit!) my $pstart = $fp->hstart # returns start coord on feature2 = protein seq. my $pend = $fp->hend # returns end coord on feature2. If you wish to swap feature1 and feature2 around : $feat->invert so... $feat->start # etc. returns data in $feature2 object No sub_SeqFeatures or tags can be stored in this object directly. Any features or tags are expected to be stored in the contained objects feature1, and feature2. CONTACT
Ewan Birney <birney@sanger.ac.uk> APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ new Title : new Usage : Function: Constructor for this module. Accepts the following parameters: -feature1 Bio::SeqFeatureI-compliant object -feature2 Bio::SeqFeatureI-compliant object -feature_factory Bio::Factory::ObjectFactoryI compliant object to be used when feature1 and/or feature2 are accessed without explicitly set before. This is mostly useful for derived classes who want to set their preferred class for feature objects. Example : Returns : Args : see above feature1 Title : feature1 Usage : $f = $featpair->feature1 $featpair->feature1($feature) Function: Get/set for the query feature Returns : Bio::SeqFeatureI Args : Bio::SeqFeatureI feature2 Title : feature2 Usage : $f = $featpair->feature2 $featpair->feature2($feature) Function: Get/set for the hit feature Returns : Bio::SeqFeatureI Args : Bio::SeqFeatureI start Title : start Usage : $start = $featpair->start $featpair->start(20) Function: Get/set on the start coordinate of feature1 Returns : integer Args : [optional] beginning of feature end Title : end Usage : $end = $featpair->end $featpair->end($end) Function: get/set on the end coordinate of feature1 Returns : integer Args : [optional] ending point of feature strand Title : strand Usage : $strand = $feat->strand() $feat->strand($strand) Function: get/set on strand information, being 1,-1 or 0 Returns : -1,1 or 0 Args : [optional] strand information to set location Title : location Usage : $location = $featpair->location $featpair->location($location) Function: Get/set location object (using feature1) Returns : Bio::LocationI object Args : [optional] LocationI to store score Title : score Usage : $score = $feat->score() $feat->score($score) Function: get/set on score information Returns : float Args : none if get, the new value if set frame Title : frame Usage : $frame = $feat->frame() $feat->frame($frame) Function: get/set on frame information Returns : 0,1,2 Args : none if get, the new value if set primary_tag Title : primary_tag Usage : $ptag = $featpair->primary_tag Function: get/set on the primary_tag of feature1 Returns : 0,1,2 Args : none if get, the new value if set source_tag Title : source_tag Usage : $tag = $feat->source_tag() $feat->source_tag('genscan'); Function: Returns the source tag for a feature, eg, 'genscan' Returns : a string Args : none seqname Title : seqname Usage : $obj->seq_id($newval) Function: There are many cases when you make a feature that you do know the sequence name, but do not know its actual sequence. This is an attribute such that you can store the seqname. This attribute should *not* be used in GFF dumping, as that should come from the collection in which the seq feature was found. Returns : value of seqname Args : newvalue (optional) hseqname Title : hseqname Usage : $featpair->hseqname($newval) Function: Get/set method for the name of feature2. Returns : value of $feature2->seq_id Args : newvalue (optional) hstart Title : hstart Usage : $start = $featpair->hstart $featpair->hstart(20) Function: Get/set on the start coordinate of feature2 Returns : integer Args : none hend Title : hend Usage : $end = $featpair->hend $featpair->hend($end) Function: get/set on the end coordinate of feature2 Returns : integer Args : none hstrand Title : hstrand Usage : $strand = $feat->strand() $feat->strand($strand) Function: get/set on strand information, being 1,-1 or 0 Returns : -1,1 or 0 Args : none hscore Title : hscore Usage : $score = $feat->score() $feat->score($score) Function: get/set on score information Returns : float Args : none if get, the new value if set hframe Title : hframe Usage : $frame = $feat->frame() $feat->frame($frame) Function: get/set on frame information Returns : 0,1,2 Args : none if get, the new value if set hprimary_tag Title : hprimary_tag Usage : $ptag = $featpair->hprimary_tag Function: Get/set on the primary_tag of feature2 Returns : 0,1,2 Args : none if get, the new value if set hsource_tag Title : hsource_tag Usage : $tag = $feat->hsource_tag() $feat->source_tag('genscan'); Function: Returns the source tag for a feature, eg, 'genscan' Returns : a string Args : none invert Title : invert Usage : $tag = $feat->invert Function: Swaps feature1 and feature2 around Returns : Nothing Args : none feature_factory Title : feature_factory Usage : $obj->feature_factory($newval) Function: Get/set the feature object factory for this feature pair. The feature object factory will be used to create a feature object if feature1() or feature2() is called in get mode without having been set before. The default is an instance of Bio::Factory::ObjectFactory and hence allows the type to be changed dynamically at any time. Example : Returns : The feature object factory in use (a Bio::Factory::ObjectFactoryI compliant object) Args : on set, a Bio::Factory::ObjectFactoryI compliant object perl v5.14.2 2012-03-02 Bio::SeqFeature::FeaturePair(3pm)
All times are GMT -4. The time now is 02:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy