Sponsored Content
Full Discussion: Modifications to a file
Top Forums Shell Programming and Scripting Modifications to a file Post 302370506 by Scrutinizer on Wednesday 11th of November 2009 04:17:33 PM
Old 11-11-2009
This might do it?
Code:
 awk 'p!=$1{p=$1;printf "track type=wiggle_0 name=\"Name\" description=\"Name\" visibility=full autoScale=off viewLimits=-5:1.25 color=0,100,0 altColor=0,100,0 priority=30 yLineOnOff=on\nvariableStep chrom="$1" span=1\n"}{print $2"\t"$3}' infile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

In Line File Modifications: Search and Replace

grep -il "TEST" ${ENVIRON}/*.pde| while read pde   do     cat $pde | sed s/"TEST 3,1"/"TEST 3,0"/g | sed s/"TEST  3,1"/"TEST  3,0"/g > ${pde}.tmp     if ; then       mv ${pde}.tmp $pde ... (2 Replies)
Discussion started by: Shakey21
2 Replies

2. UNIX for Advanced & Expert Users

Tracing file modifications

Hello all! Is there a way or a utility to trace any kind of file changes in a particular directory on any UNIX machine? The purpose is that in Unix, there are multiple ways of opening and making changes to a file. But internally, there must be something common (a single pipe, etc.) that is... (3 Replies)
Discussion started by: gupta_ca
3 Replies

3. UNIX for Dummies Questions & Answers

list files with modifications <15 minutes

Good Afternoon Guys: we can use ls -l to find out the files and their modification time. however, how to list the files say which are modified 15 minutes before. we have find command which uses -mtime and -atime for modification and access timing. However, if we just be restricted to the current... (2 Replies)
Discussion started by: tom_k_mishra
2 Replies

4. Shell Programming and Scripting

my shell script (file modifications)

hi guys Need some help on my below script #!/bin/sh if then echo "~~:S:wait:/sbin/sulogin" >> /root/joy/inittab else echo "/root/joy/inittab does not exist" fi now the problem is that when i run the above script it runs successfully but when i run it repeatedly the word echo... (2 Replies)
Discussion started by: whizkidash
2 Replies

5. Shell Programming and Scripting

question about testing in shell programming(modifications were made)

In folder A i have a file "a' and text file named infile00.I would like to do redirection :a<infile01. There is a code to do this #get a file "a" in /home/A for file in /home/A/* do if $file ] then #printing out if file is an execute file echo $file "is an... (2 Replies)
Discussion started by: thungmail
2 Replies

6. Shell Programming and Scripting

how to write modifications in to two tables

hi, how to write modifictions of two tables in the ksh (0 Replies)
Discussion started by: naveeng.81
0 Replies

7. Shell Programming and Scripting

XML file modifications using sed

Hi, During an installation process in a bash script I need to do 2 things with 2 XML files. Does the use of sed affect in any way the XML file ? 1.Add to a section in <ServerListeners> section <ServerListener> <BaseClass>myapp.module.WowConfigurator</BaseClass> </ServerListener> The... (2 Replies)
Discussion started by: potro
2 Replies

8. Shell Programming and Scripting

Modifications to a file

I have a file whose format is shown below. It has a table of numbers. In this case, I have 16 values in 12 rows. I want to select a position in the table, example, the 5th number at row 5. I need to change the value in that position by a certain amount and output the file with the modifiation. ... (6 Replies)
Discussion started by: kristinu
6 Replies

9. Shell Programming and Scripting

Modifications using Lookup file

I have 2 files. File 1 delimited by ";" File 1: 001;0;11223;xx;N;1001051;124;1;1;1001051;110;0;A_15;D;DX;U 001;0;8830943;xx;P;1226040;978;1;0;1226040;110;0;A_15;D;DX;H 001;0;10946903;xx;N;1300496;978;1;1;1300496;110;0;A_17;D;DX;H... (2 Replies)
Discussion started by: pparthiv
2 Replies

10. Shell Programming and Scripting

Sentence delimiter in perl: modifications needed

Hello, I found this Perl Script on the EuroParl website which does Sentence Splitting. #!/usr/bin/perl -w # Based on Preprocessor written by Philipp Koehn binmode(STDIN, ":utf8"); binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); use FindBin qw($Bin); use strict; my $mydir =... (0 Replies)
Discussion started by: gimley
0 Replies
Bio::SearchIO::Writer::ResultTableWriter(3pm)		User Contributed Perl Documentation	     Bio::SearchIO::Writer::ResultTableWriter(3pm)

NAME
Bio::SearchIO::Writer::ResultTableWriter - Outputs tab-delimited data for each Bio::Search::Result::ResultI object. SYNOPSIS
Example 1: Using the default columns use Bio::SearchIO; use Bio::SearchIO::Writer::ResultTableWriter; my $in = Bio::SearchIO->new(); my $writer = Bio::SearchIO::Writer::ResultTableWriter->new(); my $out = Bio::SearchIO->new( -writer => $writer ); while ( my $result = $in->next_result() ) { $out->write_result($result, ($in->report_count - 1 ? 0 : 1) ); } Example 2: Specifying a subset of columns use Bio::SearchIO; use Bio::SearchIO::Writer::ResultTableWriter; my $in = Bio::SearchIO->new(); my $writer = Bio::SearchIO::Writer::ResultTableWriter->new( -columns => [qw( query_name query_length num_hits )] ); my $out = Bio::SearchIO->new( -writer => $writer, -file => ">result.out" ); while ( my $result = $in->next_result() ) { $out->write_result($result, ($in->report_count - 1 ? 0 : 1) ); } Custom Labels You can also specify different column labels if you don't want to use the defaults. Do this by specifying a "-labels" hash reference parameter when creating the ResultTableWriter object. The keys of the hash should be the column number (left-most column = 1) for the label(s) you want to specify. Here's an example: my $writer = Bio::SearchIO::Writer::ResultTableWriter->new( -columns => [qw( query_name query_length query_description num_hits)], -labels => { 1 => 'QUERY_GI', 2 => 'QUERY_LENGTH' } ); DESCRIPTION
Bio::SearchIO::Writer::ResultTableWriter outputs data in tab-delimited format for each search result, one row per search result. This is a very coarse-grain level of information since it only includes data stored in the Bio::Search::Result::ResultI object itself and does not include any information about hits or HSPs. You most likely will never use this object but instead will use one of its subclasses: Bio::SearchIO::Writer::HitTableWriter or Bio::SearchIO::Writer::HSPTableWriter. Available Columns Here are the columns that can be specified in the "-columns" parameter when creating a ResultTableWriter object. If a "-columns" parameter is not specified, this list, in this order, will be used as the default. query_name query_length query_description For more details about these columns, see the documentation for the corresponding method in Bio::Search::Result::ResultI. 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
Steve Chervitz <sac@bioperl.org> See the FEEDBACK section for where to send bug reports and comments. COPYRIGHT
Copyright (c) 2001 Steve Chervitz. All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. DISCLAIMER
This software is provided "as is" without warranty of any kind. SEE ALSO
Bio::SearchIO::Writer::HitTableWriter, Bio::SearchIO::Writer::HSPTableWriter METHODS
to_string() Note: this method is not intended for direct use. The SearchIO::write_result() method calls it automatically if the writer is hooked up to a SearchIO object as illustrated in the SYNOPSIS section . Title : to_string() : Usage : print $writer->to_string( $result_obj, [$include_labels] ); : Argument : $result_obj = A Bio::Search::Result::ResultI object : $include_labels = boolean, if true column labels are included (default: false) : Returns : String containing tab-delimited set of data for each hit : in a ResultI object. Some data is summed across multiple HSPs. : Throws : n/a column_labels Usage : print $result_obj->column_labels(); Purpose : Get column labels for to_string(). Returns : String containing column labels. Tab-delimited. Argument : n/a Throws : n/a end_report Title : end_report Usage : $self->end_report() Function: The method to call when ending a report, this is mostly for cleanup for formats which require you to have something at the end of the document. Nothing for a text message. Returns : string Args : none filter Title : filter Usage : $writer->filter('hsp', &hsp_filter); Function: Filter out either at HSP,Hit,or Result level Returns : none Args : string => data type, CODE reference perl v5.14.2 2012-03-02 Bio::SearchIO::Writer::ResultTableWriter(3pm)
All times are GMT -4. The time now is 10:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy