Sponsored Content
Full Discussion: Solved: Text formatting
Top Forums Shell Programming and Scripting Solved: Text formatting Post 302490930 by joe228 on Wednesday 26th of January 2011 07:43:49 AM
Old 01-26-2011
Solved: Text formatting

[this question is solved, thanks!]

What's the best way to format the text file shown below the way in which


COlA ColB ColC ColD
---- ---- ---- ----
70 923 AAA 5864
70 testing AAA 13062
PPPPPP test AAA 142

Last edited by joe228; 01-26-2011 at 09:19 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

formatting text

Hi, I am having a file containing entries like: .iso.org.dod.internet.mgmt.mib-2.system.sysName.0 .iso.org.dod.internet.mgmt.mib-2.system.sysLocation.0 .iso.org.dod.internet.mgmt.mib-2.system.sysServices.0 .iso.org.dod.internet.mgmt.mib-2.system.sysORLastChange.0... (16 Replies)
Discussion started by: esham
16 Replies

2. Shell Programming and Scripting

text formatting

Hi, any idea input: mr.smith stvenson: /address #/tel no/ personal data profile. mrs.smith stevenson: /address #/tel no/occupation/ personal data profile. output: mr.smith stvenson address #: tel no: personal data profile. mrs.smith stevenson address #: tel no: occupation:... (7 Replies)
Discussion started by: kenshinhimura
7 Replies

3. UNIX for Dummies Questions & Answers

Formatting TEXT

Hello, I have the following lines in a text file: /var/spool/postfix/defer/1/15C86B0547C /var/spool/postfix/defer/1/19AD1B054A2 /var/spool/postfix/defer/2/25A16B05493 /var/spool/postfix/defer/6/626FBB05496 /var/spool/postfix/defer/6/634D4B0544A /var/spool/postfix/defer/6/6A8ACB05499... (2 Replies)
Discussion started by: mojoman
2 Replies

4. Shell Programming and Scripting

Text formatting

I have an input file as below. 1 Sanjib Gayen 2 Chetan Jadhav 3 Vijaykumar Uddi 4 Pinaki Sarkar I want to generate an output file as below. 1-Sanjib Gayen 2-Chetan Jadhav (4 Replies)
Discussion started by: R0H0N
4 Replies

5. Shell Programming and Scripting

Text formatting

A folder is having n number of files each file is having column names in it .Hence using below code . for file in /xxx/sss/* do filename=$( basename $file ) sed -e '1,2d; $d; /^*$/d; /selected\.$/d' ${file} | \ sed -e '1s/^/INSERT INTO '${filename}' VALUES (/; $!s/$/,/; $s/$/);/'... (6 Replies)
Discussion started by: rocking77
6 Replies

6. Shell Programming and Scripting

Help with Text formatting

I am generating the o/p as: BLANSWER 112747 112747 TBLQSTN 983 692 INITIATIVE 35 35 PAIGN 3122 3538 IGNCONTACT 90136 93534 IGNGROUP 27 27 AIGNSTEP 16899 20437 AIGNTYPE ... (1 Reply)
Discussion started by: karumudi7
1 Replies

7. Shell Programming and Scripting

Text formatting help

I have bunch of files with data's like below. archive.log.0104 ar0104_akl ar0731_rln ar0731_rsl M70148I need to compile all those files into a single file(.xls file) in the below format. 1st row is file name - should come in 1st column in excel In 2 - 4 row, all entries starts with... (13 Replies)
Discussion started by: vasanth_123
13 Replies

8. Shell Programming and Scripting

[Solved] Need help formatting a file

I have a report similar to the below: ^L"0.1","Run Date : 19/11/10 Navneet Bank, N.A. PAGE NO : 1" "0.2",Proc Date : 19/11/10 GLOBAL A/C SYSTEM ... (2 Replies)
Discussion started by: Gangadhar Reddy
2 Replies

9. Shell Programming and Scripting

[Solved] Sending a HTML email from cli loses formatting.

Hi, I have a .sh file, to email a report of our backups from a linux machine. It looks like this (minus a few bits): echo "HELO $host.$domain" sleep 1 echo "mail from: vdrreport@$domain" sleep 1 echo "rcpt to:$mailto" sleep 1 echo "data" sleep 1 echo "subject: $host VDR-Report... (2 Replies)
Discussion started by: cognito
2 Replies

10. Shell Programming and Scripting

[Solved] Formatting the text file

Hi All, I ahve requirement where I want to put the text file in into proper format. I am wondering how can i achieve that:- Host/Alias Name IP Address Resolved sinuiy01.infra.go2uti.com 10.240.8.158 N sinuid20.devtst.go2uti.com 10.240.8.230 N sinuid21.devtst.go2uti.com... (6 Replies)
Discussion started by: sharsour
6 Replies
Bio::Tools::Phylo::PAML::Codeml(3pm)			User Contributed Perl Documentation		      Bio::Tools::Phylo::PAML::Codeml(3pm)

NAME
Bio::Tools::Phylo::PAML::Codeml - Parses output from the PAML program codeml. SYNOPSIS
#!/usr/bin/perl -Tw use strict; use Bio::Tools::Phylo::PAML::Codeml; # need to specify the output file name (or a fh) (defaults to # -file => "codeml.mlc"); also, optionally, the directory in which # the other result files (rst, 2ML.dS, etc) may be found (defaults # to "./") my $parser = new Bio::Tools::Phylo::PAML::Codeml::Parser (-file => "./results/mlc", -dir => "./results/"); # get the first/next result; a Bio::[...]::Codeml::Result object my $result = $parser->next_result(); # get the sequences used in the analysis; returns Bio::PrimarySeq # objects (OTU = Operational Taxonomic Unit). my @otus = $result->get_seqs(); # codon summary: codon usage of each sequence [ arrayref of { # hashref of counts for each codon } for each sequence and the # overall sum ], and positional nucleotide distribution [ arrayref # of { hashref of frequencies for each nucleotide } for each # sequence and overall frequencies ]. my ($codonusage, $ntdist) = $result->get_codon_summary(); # example manipulations of $codonusage and $ntdist: printf "There were %d '%s' codons in the first seq (%s) ", $codonusage->[0]->{AAA}, 'AAA', $otus[0]->id(); printf "There were %d '%s' codons used in all the sequences ", $codonusage->[$#{$codonusage}]->{AAA}, 'AAA'; printf "Nucleotide '%c' was present %g of the time in seq %s ", 'A', $ntdist->[1]->{A}, $otus[1]->id(); # get Nei & Gojobori dN/dS matrix: my $NGmatrix = $result->get_NGmatrix(); # get ML-estimated dN/dS matrix, if calculated; this corresponds to # the runmode = -2, pairwise comparison usage of codeml my $MLmatrix = $result->get_MLmatrix(); # These matrices are length(@otu) x length(@otu) "strict lower # triangle" 2D-matrices, which means that the diagonal and # everything above it is undefined. Each of the defined cells is a # hashref of estimates for "dN", "dS", "omega" (dN/dS ratio), "t", # "S" and "N". If a ML matrix, "lnL" will also be defined. Any # additional ML parameters estimated by the model will be in an # array ref under "params"; it's up to the user to know which # position corresponds to which parameter (since PAML doesn't label # them, and we can't guess very well yet (a TODO I guess). printf "The omega ratio for sequences %s vs %s was: %g ", $otus[0]->id, $otus[1]->id, $MLmatrix->[0]->[1]->{omega}; # with a little work, these matrices could also be passed to # Bio::Tools::Run::Phylip::Neighbor, or other similar tree-building # method that accepts a matrix of "distances" (using the LOWTRI # option): my $distmat = [ map { [ map { $$_{omega} } @$_ ] } @$MLmatrix ]; # for runmode's other than -2, get tree topology with estimated # branch lengths; returns a Bio::Tree::TreeI-based tree object with # added PAML parameters at each node my $tree = $result->get_tree(); for my $node ($tree->get_nodes()) { # inspect the tree: the "t" (time) parameter is available via # $node->branch_length(); all other branch-specific parameters # ("omega", "dN", etc.) are available via $node->param('omega'); } # get any general model parameters: kappa (the # transition/transversion ratio), NSsites model parameters ("p0", # "p1", "w0", "w1", etc.), etc. my $params = $result->get_model_params(); printf "M1 params: p0 = %g p1 = %g ", $params->{p0}, $params->{p1}; # for NSsites models, obtain posterior probabilities for membership # in each class for every position; probabilities correspond to # classes w0, w1, ... etc. my @probs = $result->get_posteriors(); # find, say, positively selected sites! if ($params->{w2} > 1) { for (my $i = 0; $i < @probs ; $i++) { if ($probs[$i]->[2] > 0.5) { # assumes model M1: three w's, w0, w1 and w2 (positive selection) printf "position %d: (%g prob, %g omega, %g mean w) ", $i, $probs[$i]->[2], $params->{w2}, $probs[$i]->[3]; } } } else { print "No positive selection found! "; } DESCRIPTION
This module is used to parse the output from the PAML program codeml. You can use the Bio::Tools::Run::Phylo::Phylo::PAML::Codeml module to actually run codeml; this module is only useful to parse the output. 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 the Bioperl mailing list. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/MailList.shtml - About the mailing lists Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via email or the web: bioperl-bugs@bioperl.org http://bioperl.org/bioperl-bugs/ AUTHOR - Jason Stajich, Aaron Mackey Email jason@bioperl.org Email amackey@virginia.edu TODO
This module should also be able to handle "codemlsites" batch output... APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ new Title : new Usage : my $obj = new Bio::Tools::Phylo::PAML::Codeml(); Function: Builds a new Bio::Tools::Phylo::PAML::Codeml object Returns : Bio::Tools::Phylo::PAML::Codeml Args : get_trees Title : get_trees Usage : my @trees = $codemlparser->get_trees(); Function: Returns a list of trees (if any) are in the output file Returns : List of L<Bio::Tree::TreeI> objects Args : none get_statistics Title : get_statistics Usage : my $data = $codemlparser->get_statistics Function: Retrieves the set of pairwise comparisons Returns : Hash Reference keyed as 'seqname' -> 'seqname' -> 'datatype' Args : none perl v5.14.2 2012-03-02 Bio::Tools::Phylo::PAML::Codeml(3pm)
All times are GMT -4. The time now is 10:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy