08-09-2011
Deleting words and sorting
I have a file that looks some like this:
Quote:
##################################### topd Tree1 - Tree5 #######################################
* Percentage of taxa in common: 100.0%
* Nodal Distance (Pruned/Unpruned): 2.077448 / 2.077448
* Nodal Distance random (Pruned/Unpruned): ( 5.097028 +/- 0.358701 ) / ( 5.097028 +/- 0.358701 )
##################################### topd Tree1 - Tree3 #######################################
* Percentage of taxa in common: 100.0%
* Nodal Distance (Pruned/Unpruned): 1.768821 / 1.768821
* Nodal Distance random (Pruned/Unpruned): ( 5.067970 +/- 0.367315 ) / ( 5.067970 +/- 0.367315 )
##################################### topd Tree1 - Tree2 #######################################
* Percentage of taxa in common: 100.0%
* Nodal Distance (Pruned/Unpruned): 1.962142 / 1.962142
* Nodal Distance random (Pruned/Unpruned): ( 5.148824 +/- 0.367955 ) / ( 5.148824 +/- 0.367955 )
##################################### topd Tree1 - Tree127 #######################################
* Percentage of taxa in common: 100.0%
* Nodal Distance (Pruned/Unpruned): 1.470470 / 1.470470
* Nodal Distance random (Pruned/Unpruned): ( 5.058969 +/- 0.347412 ) / ( 5.058969 +/- 0.347412 )
##################################### topd Tree1 - Tree88 #######################################
* Percentage of taxa in common: 100.0%
* Nodal Distance (Pruned/Unpruned): 1.529534 / 1.529534
* Nodal Distance random (Pruned/Unpruned): ( 5.073246 +/- 0.355342 ) / ( 5.073246 +/- 0.355342 )
I need to delete most of the information and sort the rest in such way that I get the following output file
Quote:
Tree2: 1.962142
Tree3: 1.768821
Tree5: 2.077448
Tree88: 1.529534
Tree127: 1.470470
Any help will be greatly appreciated
Last edited by Xterra; 08-09-2011 at 12:57 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Please tell me how could i delete symbols, whitespaces, characters, words everything between two words in a line. Let my file is
aaa BB ccc ddd eee FF kkk xxx
123456 BB 44^& iop FF 999
xxx uuu rrr BB hhh nnn FF 000
I want to delete everything comes in between BB and FF( deletion... (3 Replies)
Discussion started by: rish_max
3 Replies
2. UNIX for Dummies Questions & Answers
I don't really know much about UNIX commands, so if someone could help me understand how to do this, I'd really appreciate it.
I have a text file with data that looks like this (filename: numbers.txt):
1 1 1 1 1 1 1 1 1 2 1 1_2 2_1
1 1 1 1 1 1 1 1 2 1 2 1_2 2_1
1 1 1 1 1 1 1 1 2 1 2 1_2 2_1... (12 Replies)
Discussion started by: zac100
12 Replies
3. Shell Programming and Scripting
Hi
Is it possible to do the following in a single command
/usr/xpg4/bin/sed -e '/rows selected/d' /aemu/CALLAUTO/callauto.txt > /aemu/CALLAUTO/callautonew.txt
/usr/xpg4/bin/sed -e '/^$/d' /aemu/CALLAUTO/callautonew.txt > /aemu/CALLAUTO/callauto_new.txt
exit (1 Reply)
Discussion started by: aemunathan
1 Replies
4. Shell Programming and Scripting
Hi !!!
I need to write a script(ksh) that deletes any character outside <start> tag and </start> from a file.
For eg:
$cat file.txt
<start>
ad
bd
</start>
as</start>
<start>
d
e
f
mb<start>mu
g
h
i (7 Replies)
Discussion started by: PRKS
7 Replies
5. Shell Programming and Scripting
Hi, i'm currently new to scripting and need some help with my problem, so i'll jump right to it.
I have a file containing text, the file is pretty big so for the sake of this i'll just say this is the text:
John id number is abc34938
Grahams id number is pending
id number abc64334 is Bob's ... (14 Replies)
Discussion started by: linuxkid
14 Replies
6. UNIX for Dummies Questions & Answers
Morning Guys & Gals,
I am trying to figure out a way to remove lines from a file that have more than
2 identical characters in sequence..
So if for instance the list would look like ;
the output would be ;
I can't seem to get my head around perl (among many other... (7 Replies)
Discussion started by: TAPE
7 Replies
7. UNIX for Dummies Questions & Answers
i need to write a bash script that recive a list of varuables
kaka pele ronaldo beckham zidane messi rivaldo gerrard platini
i need the program to print the longest word of the list.
word in the output appears on a separate line and word order in the output is in the order Llachsicografi costs.... (1 Reply)
Discussion started by: yairpg
1 Replies
8. Shell Programming and Scripting
Hello,
My OS is Windows and therefore DOS. Hence I have no access to Unix tools.
I am trying to sort a file in Urdu by the character by which it ends. Each word is on a separate line.
As input, an example in English would help:
fruit
banana
apple
pear
house
I need the sort to be on the... (5 Replies)
Discussion started by: gimley
5 Replies
9. UNIX for Dummies Questions & Answers
Hi there, newbie there. I've been browsing the forums hoping to find a solution that answers a problem similar to what I need, but haven't had much luck. Any help would be greatly appreciated. Thanks!
I need to delete a bunch of text between every appearance of two words in a really large file... (3 Replies)
Discussion started by: lendl
3 Replies
10. Shell Programming and Scripting
Hello,
I have a list of words separated by spaces I am trying to delete from a text file, and I could not figure out what is the best way to do this.
what I tried (does not work) :
delete="password key number verify"
arr=($delete)
for i in arr
{
sed "s/\<${arr}\>]*//g" in.txt
}
>... (5 Replies)
Discussion started by: Hawk4520
5 Replies
LEARN ABOUT DEBIAN
go::metadata::panther
GO::Metadata::Panther(3pm) User Contributed Perl Documentation GO::Metadata::Panther(3pm)
NAME
GO::Metadata::Panther - Species info for data used by Panther Clusters
SYNOPSIS
use GO::Metadata::Panther qw/@species/;
for my $species (@species) {
# do something
}
Or
use GO::Metadata::Panther;
my $s = GO::Metadata::Panther->code('YEAST');
DESCRIPTION
Accesses information related to species in the Panther seq2pthr.gz file. This file can be fetched from:
<ftp://ftp.pantherdb.org/genome/pthr7.0/>
Each item in the exportable @species array contains a hash reference for each species. The items in that hash are:
code
A scalar or the UniProt species code.
ncbi_taxa_id
A scalar reference of NCBI taxa ids that items in the GO database match. This should only be one id, but sometimes it's useful to scan
multiple.
For a complete list of every UniProt species matched to a NCBI taxa <http://www.uniprot.org/docs/speclist>
Constructors
The constructors scans @species for the requested data and returns the object that matches the data. Otherwise it returns a false false.
my $s = GO::Metadata::Panther->code(unicode_species_code)
Return an object filled with the species reference from the UniProtKB species code.
my $s = GO::Metadata::Panther->ncbi(ncbi_taxa_id)
Greate an object from the ncbi_taxa_id.
Function
Functions that can be used outside of the OO interface.
GO::Metadata::Panther::codes()
Returns a list of all UniProt species codes in @species.
GO::Metadata::Panther::valid_codes(unicode_species_code)
Send it a list of panther Unicode codes, returns true if they are all present in @species. Othewise returns false.
OO Function
$s->ncbi_ids()
Returns the list of NCBI taxa identifiers associated with the UniProt species code. In a perfect word this will only every return one
value. In any case, the first value will be the actual numeric identifier associated.
AUTHOR
Sven Heinicke <sven@genomics.princeton.edu</gt>
perl v5.14.2 2010-07-08 GO::Metadata::Panther(3pm)