Mean score value by ID over a defined genomic region


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Mean score value by ID over a defined genomic region
# 8  
Old 09-15-2015
Sounds like there is a DOS line separator (^M or 0X0D or <CR>) in your first file. Try to remove and run again.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Average score

awk '{if(len==0){last=$4;total=$6;len=1;getline}if($4!=last){printf("%s\t%f\n", last, total/len);last=$4;total=$6;len=1}else{total+=$6;len+=1}}END{printf("%s\t%f\n", last, total/len)}' exon.txt > output.txt In the attached file I am just trying to group all the same names in column $4 and then... (2 Replies)
Discussion started by: cmccabe
2 Replies

2. Shell Programming and Scripting

Split a file in more files based on score content

Dear All, I have the following file tabulated: ID distanceTSS score 8434 571269 10 10122 393912 9 7652 6 10 4863 1451 9 8419 39 2 9363 564 21 9333 7714 22 9638 8334 9 1638 1231 11 10701 918 1000 6587 32056 111 What I would like to do is the following, create 100 new files based... (5 Replies)
Discussion started by: paolo.kunder
5 Replies

3. AIX

Change lv REGION in HDISK1

Dears my rootvg is missed up i can not extend the /opt as soon as i try to extend the Filesystem its give me that there is not enough space . as there any way to change the REGION of the LVs in HDISK1 ? lspv -p hdisk0 hdisk0: PP RANGE STATE REGION LV NAME TYPE ... (8 Replies)
Discussion started by: thecobra151
8 Replies

4. UNIX for Dummies Questions & Answers

overlapped genomic coordinates

Hi, I would like to know how can I get the ID of a feature if its genomic coordinates overlap the coordinates of another file. Example: Get the 4th column (ID) of this file1: chr1 10 100 gene1 chr2 3000 5000 gene2 chr3 200 1500 gene3 if it overlaps with a feature in this file2: chr2... (1 Reply)
Discussion started by: fadista
1 Replies

5. Shell Programming and Scripting

Region between lines

How can I find the regions between specific lines? I have a file which contains lines like this: chr1 0 17388 0 chr1 17388 17444 1 chr1 17444 17599 2 chr1 17599 17601 1 chr1 17601 569791 0 chr1 569791 569795 1 chr1 569795 569808 2 chr1 569808 569890 3 chr1 569890 570047 4 ... (9 Replies)
Discussion started by: linseyr
9 Replies

6. UNIX for Dummies Questions & Answers

Genomic data processing

Dear fellow members, I've just joined the forum and am a newbie to shell scripting and programming. I'm stuck on the following problem. I'm working with large scale genomic data and need to do some analyses on it. Essentially it is text processing problem, so please don't mind the scientific... (0 Replies)
Discussion started by: mvaishnav
0 Replies

7. Shell Programming and Scripting

Grade Score Script Project

What I thought would be an extremely simple project has proven more difficult for me than I thought. Here are the parameters: Thus far, I've been able to sort the final grades, but I'm having a lot of trouble with appending the correlating letter grade to the end of each line. Any help would be... (3 Replies)
Discussion started by: lazypeterson
3 Replies

8. Shell Programming and Scripting

remove lines based on score criteria

Hi guys, Please guide for Solution. PART-I INPUT FILE (has 2 columns ID and score) TC5584_1 93.9 DV161411_2 79.5 BP132435_5 46.8 EB682112_1 34.7 BP132435_4 29.5 TC13860_2 10.1 OUTPUT FILE (It shudn't contain the line ' BP132435_4 29.5 ' as BP132435 is repeated... (2 Replies)
Discussion started by: smriti_shridhar
2 Replies

9. Post Here to Contact Site Administrators and Moderators

I cant updated the score on space invaders

Hello The same thing happen to me yesterday I canīt record my score on invaders game. (0 Replies)
Discussion started by: lo-lp-kl
0 Replies

10. UNIX for Advanced & Expert Users

stack region

how can i determine that what percentage of stack region is currently is used? (i am using tru64 unix) (2 Replies)
Discussion started by: yakari
2 Replies
Login or Register to Ask a Question
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)