Sponsored Content
Full Discussion: Matrix parsing help !
Top Forums Programming Matrix parsing help ! Post 302586777 by mchimich on Tuesday 3rd of January 2012 08:30:51 AM
Old 01-03-2012
hi ctsgnb and zaxxon thanks a lot for replying. what i need is group the id basing in the identity sequence for exemple :
Code:
ID1 ID2  Identity
A    B      70
A    C      50
A    D      90
A    E      80
B    C      95
B    D      66
B    E      47
C    D      35
C    E      25
D    E      98

The output will be like that :
Code:
A D E
B C

Note : It means that the sequence A D and E are together because they share more than 80 of identity . In the same way B and C are closed because of their identity.
Sorry for my bad english ! Smilie

Last edited by radoulov; 01-04-2012 at 05:17 AM.. Reason: Code tags!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl parsing compared to Ksh parsing

#! /usr/local/bin/perl -w $ip = "$ARGV"; $rw = "$ARGV"; $snmpg = "/usr/local/bin/snmpbulkget -v2c -Cn1 -Cn2 -Os -c $rw"; $snmpw = "/usr/local/bin/snmpwalk -Os -c $rw"; $syst=`$snmpg $ip system sysName sysObjectID`; sysDescr.0 = STRING: Cisco Internetwork Operating System Software... (1 Reply)
Discussion started by: popeye
1 Replies

2. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

3. Shell Programming and Scripting

diagonal matrix to square matrix

Hello, all! I am struggling with a short script to read a diagonal matrix for later retrieval. 1.000 0.234 0.435 0.123 0.012 0.102 0.325 0.412 0.087 0.098 1.000 0.111 0.412 0.115 0.058 0.091 0.190 0.045 0.058 1.000 0.205 0.542 0.335 0.054 0.117 0.203 0.125 1.000 0.587 0.159 0.357... (11 Replies)
Discussion started by: yifangt
11 Replies

4. Shell Programming and Scripting

Matrix

Hi All I would like to merge multiple files with the same row and column size into a matrix format In a folder I have multiple files in the following format vi 12.txt a 1 b 5 c 7 d 0 vi 45.txt a 3 b 6 c 9 d 2 vi 9.txt a 4 (7 Replies)
Discussion started by: Lucky Ali
7 Replies

5. Ubuntu

How to convert full data matrix to linearised left data matrix?

Hi all, Is there a way to convert full data matrix to linearised left data matrix? e.g full data matrix Bh1 Bh2 Bh3 Bh4 Bh5 Bh6 Bh7 Bh1 0 0.241058 0.236129 0.244397 0.237479 0.240767 0.245245 Bh2 0.241058 0 0.240594 0.241931 0.241975 ... (8 Replies)
Discussion started by: evoll
8 Replies

6. Shell Programming and Scripting

awk? adjacency matrix to adjacency list / correlation matrix to list

Hi everyone I am very new at awk but think that that might be the best strategy for this. I have a matrix very similar to a correlation matrix and in practical terms I need to convert it into a list containing the values from the matrix (one value per line) with the first field of the line (row... (5 Replies)
Discussion started by: stonemonkey
5 Replies

7. Shell Programming and Scripting

Constructing a Matrix

Hi, I do have couple of files in a folder. The names of each of the files have a pattern. ahet_005678.txt ahet_005898.txt ahet_007678.txt ahet_004778.txt ... ... ahet_002378.txt Each of the above files have the same pattern of data with 4 columns and have an header for the last 3... (4 Replies)
Discussion started by: Kanja
4 Replies

8. Shell Programming and Scripting

Highest value matrix parsing

Hi All I do have a matrix in the following format a_2 a_3 s_4 t_6 b 0 0.9 0.004 0 c 0 0 1 0 d 0 0.98 0 0 e 0.0023 0.96 0 0.0034 I have thousands of rows I would like to parse the maximum value in each of the row and out put that highest value along the column header of... (2 Replies)
Discussion started by: Kanja
2 Replies

9. Shell Programming and Scripting

Parsing a subset of data from a large matrix

I do have a large matrix of the following format and it is tab delimited ch-ab1-20 ch-bb2-23 ch-ab1-34 ch-ab1-24 er-cc1-45 bv-cc1-78 ch-ab1-20 0 2 3 4 5 6 ch-bb2-23 3 0 5 ... (6 Replies)
Discussion started by: Kanja
6 Replies
Bio::Matrix::PSM::IO(3pm)				User Contributed Perl Documentation				 Bio::Matrix::PSM::IO(3pm)

NAME
Bio::Matrix::PSM::IO - PSM parser SYNOPSIS
use Bio::Matrix::PSM::IO; my $psmIO= Bio::Matrix::PSM::IO->new(-file=>$file, -format=>'transfac'); my $release=$psmIO->release; #Using Bio::Matrix::PSM::PsmHeader methods my $release=$psmIO->release; while (my $psm=$psmIO->next_psm) { my %psm_header=$psm->header; my $ic=$psm_header{IC}; my $sites=$psm_header{sites}; my $width=$psm_header{width}; my $score=$psm_header{e_val}; my $IUPAC=$psm->IUPAC; } my $instances=$psm->instances; foreach my $instance (@{$instances}) { my $id=$instance->primary_id; } DESCRIPTION
This module allows you to read DNA position scoring matrices and/or their respective sequence matches from a file. There are two header methods, one belonging to Bio::Matrix::PSM::IO::driver and the other to Bio::Matrix::PSM::Psm. They provide general information about the file (driver) and for the current PSM result (Psm) respectively. Psm header method always returns the same thing, but some values in the hash might be empty, depending on the file you are parsing. You will get undef in this case (no exceptions are thrown). Please note that the file header data (commenatries, version, input data, configuration, etc.) might be obtained through Bio::Matrix::PSM::PsmHeader methods. Some methods are driver specific (meme, transfac, etc.): meme: weight mast: seq, instances If called when you parse a different file type you will get undef. For example: my $psmIO= Bio::Matrix::PSM::IO->new(file=>$file, format=>'transfac'); my %seq=$psmIO->seq; will return an empty hash. To see all methods and how to use them go to Bio::Matrix::PSM::PsmHeaderI. See also Bio::Matrix::PSM::PsmI for details on using and manipulating the parsed data. The only way to write PFM/PWM is through masta module (something like fasta for DNA matrices). You can see an example by reading Bio::Matrix::PSM::IO::masta documentation. See also Bio::Matrix::PSM::PsmI, Bio::Matrix::PSM::PsmHeaderI, Bio::Matrix::PSM::IO::masta 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 - Stefan Kirov Email skirov@utk.edu APPENDIX
new Title : new Usage : my $psmIO = Bio::Matrix::PSM::IO->new(-format=>'meme', -file=>$file); Function: Associates a file with the appropriate parser Throws : Throws if the file passed is in HTML format or if some criteria for the file format are not met. See L<Bio::Matrix::PSM::IO::meme> and L<Bio::Matrix::PSM::IO::transfac> for more details. Example : Returns : psm object, associated with a file with matrix file Args : hash fh Title : fh Usage : $obj->fh Function: Get a filehandle type access to the matrix parser Example : $fh = $obj->fh; # make a tied filehandle $matrix = <$fh>; # read a matrix object Returns : filehandle tied to Bio::Matrix::PSM::IO class Args : none _load_format_module Title : _load_format_module Usage : *INTERNAL Matrix::PSM::IO stuff* Function: Loads up (like use) a module at run time on demand _guess_format Title : _guess_format Usage : $obj->_guess_format($filename) Returns : guessed format of filename (lower case) Args : filename next_psm Title : next_psm Usage : my $psm=$psmIO->next_psm(); Function: Reads the next PSM from the input file, associated with this object Throws : Throws if there ara format violations in the input file (checking is not very strict with all drivers). Example : Returns : Bio::Matrix::PSM::Psm object Args : none _parseMatrix Title : _parseMatrix Usage : Function: Parses the next site matrix information in the meme file Throws : Example : Internal stuff Returns : hash as for constructing a SiteMatrix object (see SiteMatrixI) Args : string _parseInstance Title : _parseInstance Usage : Function: Parses the next sites instances from the meme file Throws : Example : Internal stuff Returns : Bio::Matrix::PSM::SiteMatrix object Args : array references _parse_coordinates Title : _parse_coordinates Usage : Function: Throws : Example : Internal stuff Returns : Args : header Title : header Usage : my %header=$psmIO->header; Function: Returns the header for the PSM file, format specific Throws : Example : Returns : Hash or a single string with driver specific information Args : none _make_matrix Title : _make_matrix Usage : Function: makes a matrix from 4 array references (A C G T) Throws : Example : Returns : SiteMatrix object Args : array of references(A C G T) perl v5.14.2 2012-03-02 Bio::Matrix::PSM::IO(3pm)
All times are GMT -4. The time now is 11:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy