Sponsored Content
Full Discussion: Re-ordering data
Top Forums Shell Programming and Scripting Re-ordering data Post 302502119 by quincyjones on Monday 7th of March 2011 12:38:21 AM
Old 03-07-2011
Thanx Chubler. Only problem is that strand column is missing.
Code:
qqq	start	end	strand	zzFactor	ttt	cut-off	seq_position	kmer_location	k-mer	Score
qqq10	100017878		100017978	XXX	crsmsgw	0.6429	26	qqq10:100017953	cgcccgg	0.753
qqq10	100017878		100017978	YYY	crsmsgw	0.6429	26	qqq10:100017953	cgcccgg	0.753

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

proper ordering of o/p values

Hi, Below is my script which creates a file: #!/bin/sh if then echo "Enter bill period " echo "Syntax: sh cpd.sh G08" exit fi sqlplus uname/pwd@dbname <<EOF set WRAP off set FEEDBACK off set PAGESIZE 0 set VERIFY off (14 Replies)
Discussion started by: ss_ss
14 Replies

2. Shell Programming and Scripting

File ordering by portion of filename

Hi, Lets say I have a few xml files: 1234567894.xml abc_1234567895.xml abc_000_1234567890.xml abc_0000000_1234567893.xml 684_abc_000_1234567899.xml The naming convention of the files is: xxxxx_timestamp.xml OR timestamp.xml where x can be anything and I would like to order them by... (4 Replies)
Discussion started by: Leion
4 Replies

3. Homework & Coursework Questions

word ordering problem HELP please (linux)

Hi guys I need you ,please help me i have to do this for tomorow and i don't understand how to do Q1 : Order the words of RADIO.txt by frequency Q2 : Order the words of RADIO.txt in alphabétique order Q3 : Order the words of RADIO.txt par ordre "rhymique" (exemple, put togeder words which are... (1 Reply)
Discussion started by: Lili
1 Replies

4. Shell Programming and Scripting

ordering a data file

With an input file like this: How can I get an output like this? (In the quoted examples, the "_" sign represents an empty space) Note that there are some minus signs and no spaces, in the example above the first character of the first line is an empty space, so each number spans 10... (16 Replies)
Discussion started by: lego
16 Replies

5. Shell Programming and Scripting

Re ordering lines - Awk

Is it possible to re-order certain rows as columns (of large files). Few lines from the file for reference. input Splicing Factor: Tra2beta, Motif: aaguguu, Cutoff: 0.5000 Sequence Position Genomic Coordinate K-mer Score 97 chr1:67052604 uacuguu 0.571 147... (3 Replies)
Discussion started by: quincyjones
3 Replies

6. Shell Programming and Scripting

ordering

file1 1 SNP2 3 1 SNP3 3 1 SNP5 4 2 SNP1 4 2 SNP4 4 file2 SNP1 1 1 1 SNP5 5 5 5 SNP4 4 4 4 SNP2 2 2 2 SNP3 1 1 1 desired output (1 Reply)
Discussion started by: johnkim0806
1 Replies

7. Shell Programming and Scripting

Random ordering

1 2 4 5 3 I would like to use a script so that i can randomly rearrange these numbers such as 3 5 2 4 1 Thanks! (3 Replies)
Discussion started by: johnkim0806
3 Replies

8. Shell Programming and Scripting

Ordering Folders having Date as Names

Hi All, I have directories under /development/arun/weekly/ 20120421 20120414 . . . . I need to arrange these directories in descending order. folder name with recent date will be on top and then others. (1 Reply)
Discussion started by: Arun Mishra
1 Replies

9. Shell Programming and Scripting

Ordering batch number

Hi, Could some one please help to order the batch number in sequence. I will be getting bunch of files with batch number in folder1 which are not in sequence. I need to move all files from folder1 to folder2 with batch number in sequence. Header record looks like PROCESS1... (8 Replies)
Discussion started by: zooby
8 Replies

10. Shell Programming and Scripting

Bash - re-ordering list of parameters

Hello. I have a script that writes parameters in alphabetic order. But I have a parameter which have 3 lines. There is no continuation character ( '\' ). Each of the three lines finish with 'cr'. But line 2 and 3 of the concerning parameter start with a tab char (but should be one or more... (7 Replies)
Discussion started by: jcdole
7 Replies
Bio::RangeI(3pm)					User Contributed Perl Documentation					  Bio::RangeI(3pm)

NAME
Bio::RangeI - Range interface SYNOPSIS
#Do not run this module directly DESCRIPTION
This provides a standard BioPerl range interface that should be implemented by any object that wants to be treated as a range. This serves purely as an abstract base class for implementers and can not be instantiated. Ranges are modeled as having (start, end, length, strand). They use Bio-coordinates - all points >= start and <= end are within the range. End is always greater-than or equal-to start, and length is greater than or equal to 1. The behaviour of a range is undefined if ranges with negative numbers or zero are used. So, in summary: length = end - start + 1 end >= start strand = (-1 | 0 | +1) 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 one of the Bioperl mailing lists. 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 the bugs and their resolution. Bug reports can be submitted via the web: https://redmine.open-bio.org/projects/bioperl/ AUTHOR - Heikki Lehvaslaiho Email: heikki-at-bioperl-dot-org CONTRIBUTORS
Juha Muilu (muilu@ebi.ac.uk) Sendu Bala (bix@sendu.me.uk) Malcolm Cook (mec@stowers-institute.org) Stephen Montgomery (sm8 at sanger.ac.uk) APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ Abstract methods These methods must be implemented in all subclasses. start Title : start Usage : $start = $range->start(); Function: get/set the start of this range Returns : the start of this range Args : optionally allows the start to be set using $range->start($start) end Title : end Usage : $end = $range->end(); Function: get/set the end of this range Returns : the end of this range Args : optionally allows the end to be set using $range->end($end) length Title : length Usage : $length = $range->length(); Function: get/set the length of this range Returns : the length of this range Args : optionally allows the length to be set using $range->length($length) strand Title : strand Usage : $strand = $range->strand(); Function: get/set the strand of this range Returns : the strandedness (-1, 0, +1) Args : optionally allows the strand to be set using $range->strand($strand) Boolean Methods These methods return true or false. They throw an error if start and end are not defined. $range->overlaps($otherRange) && print "Ranges overlap "; overlaps Title : overlaps Usage : if($r1->overlaps($r2)) { do stuff } Function: tests if $r2 overlaps $r1 Args : arg #1 = a range to compare this one to (mandatory) arg #2 = optional strand-testing arg ('strong', 'weak', 'ignore') Returns : true if the ranges overlap, false otherwise contains Title : contains Usage : if($r1->contains($r2) { do stuff } Function: tests whether $r1 totally contains $r2 Args : arg #1 = a range to compare this one to (mandatory) alternatively, integer scalar to test arg #2 = optional strand-testing arg ('strong', 'weak', 'ignore') Returns : true if the argument is totally contained within this range equals Title : equals Usage : if($r1->equals($r2)) Function: test whether $r1 has the same start, end, length as $r2 Args : arg #1 = a range to compare this one to (mandatory) arg #2 = optional strand-testing arg ('strong', 'weak', 'ignore') Returns : true if they are describing the same range Geometrical methods These methods do things to the geometry of ranges, and return Bio::RangeI compliant objects or triplets (start, stop, strand) from which new ranges could be built. intersection Title : intersection Usage : ($start, $end, $strand) = $r1->intersection($r2); OR ($start, $end, $strand) = Bio::Range->intersection(@ranges); OR my $containing_range = $r1->intersection($r2); OR my $containing_range = Bio::Range->intersection(@ranges); Function: gives the range that is contained by all ranges Returns : undef if they do not overlap or if @ranges has only a single range, else returns the range that they do overlap. In scalar contex, the return value is an object of the same class as the calling one. In array context the return value is a three element array. Args : arg #1 = [REQUIRED] a Bio::RangeI to compare this one to, or an array ref of ranges arg #2 = optional strand-testing arg ('strong', 'weak', 'ignore') union Title : union Usage : ($start, $end, $strand) = $r1->union($r2); : ($start, $end, $strand) = Bio::Range->union(@ranges); my $newrange = Bio::Range->union(@ranges); Function: finds the minimal Range that contains all of the Ranges Args : a Range or list of Range objects Returns : the range containing all of the range. In scalar contex, the return value is an object of the same class as the calling one. In array context the return value is a three element array. overlap_extent Title : overlap_extent Usage : ($a_unique,$common,$b_unique) = $a->overlap_extent($b) Function: Provides actual amount of overlap between two different ranges Example : Returns : array of values containing the length unique to the calling range, the length common to both, and the length unique to the argument range Args : a range disconnected_ranges Title : disconnected_ranges Usage : my @disc_ranges = Bio::Range->disconnected_ranges(@ranges); Function: finds the minimal set of ranges such that each input range is fully contained by at least one output range, and none of the output ranges overlap Args : a list of ranges Returns : a list of objects of the same type as the input (conforms to RangeI) offsetStranded Title : offsetStranded Usage : $rnge->ofsetStranded($fiveprime_offset, $threeprime_offset) Function : destructively modifies RangeI implementing object to offset its start and stop coordinates by values $fiveprime_offset and $threeprime_offset (positive values being in the strand direction). Args : two integer offsets: $fiveprime_offset and $threeprime_offset Returns : $self, offset accordingly. subtract Title : subtract Usage : my @subtracted = $r1->subtract($r2) Function: Subtract range r2 from range r1 Args : arg #1 = a range to subtract from this one (mandatory) arg #2 = strand option ('strong', 'weak', 'ignore') (optional) Returns : undef if they do not overlap or r2 contains this RangeI, or an arrayref of Range objects (this is an array since some instances where the subtract range is enclosed within this range will result in the creation of two new disjoint ranges) perl v5.14.2 2012-03-02 Bio::RangeI(3pm)
All times are GMT -4. The time now is 06:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy