Sponsored Content
Top Forums Shell Programming and Scripting Search and replace with mapping from a mapper file in a target file Post 302735633 by gimley on Sunday 25th of November 2012 08:32:04 PM
Old 11-25-2012
Many thanks. Will try the solution out and get back to you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search and replace in file

Hi guys, I have one file with duplicate string. I want to replace all the occurance of that string with some other string. How can I do that in vi editor? Malay Maru (3 Replies)
Discussion started by: malaymaru
3 Replies

2. UNIX for Dummies Questions & Answers

how can search a String in one text file and replace the whole line in another file

i am very new to UNIX plz help me in this scenario i have two text files as below file1.txt name=Rajakumar. Discipline=Electronics and communication. Designation=software Engineer. file2.txt name=Kannan. Discipline=Mechanical. Designation=CADD Design Engineer. ... (6 Replies)
Discussion started by: kkraja
6 Replies

3. Shell Programming and Scripting

Search in one file replace the same in next file

yyyyy (4 Replies)
Discussion started by: kkraja
4 Replies

4. UNIX for Dummies Questions & Answers

VIM search and replace with line breaks in both the target and replacement text

Hi, Ive spent ages trying to find an explanation for how to do this on the web, but now feel like I'm :wall: I would like to change each occurence (there are many within my script) of the following: to in Vim. I know how to search and replace when it is just single lines... (2 Replies)
Discussion started by: blueade7
2 Replies

5. Shell Programming and Scripting

Optimised way for search & replace a value on one line in a very huge file (File Size is 24 GB).

Hi Experts, I had to edit (a particular value) in header line of a very huge file so for that i wanted to search & replace a particular value on a file which was of 24 GB in Size. I managed to do it but it took long time to complete. Can anyone please tell me how can we do it in a optimised... (7 Replies)
Discussion started by: manishkomar007
7 Replies

6. Shell Programming and Scripting

Search and replace from file in awk using a 16 bit text file

Hello, Some time ago a helpful awk file was provided on the forum which I give below: NR==FNR{A=$0;next}{for(j in A){split(A,P,"=");for(i=1;i<=NF;i++){if($i==P){$i=P}}}}1 While it works beautifully on English and Latin characters i.e. within the ASCII range of 127, the moment a character beyond... (6 Replies)
Discussion started by: gimley
6 Replies

7. Shell Programming and Scripting

Search in a file and replace the mapped entity in another file

Hello, I looked for all search and replace routines in the forum but could find none which meets my requirement. I have a file in which a set of mappers are provided. The structure is as under a=b c=d e=f A simplistic example from English and French would make this clear: John=Jean... (2 Replies)
Discussion started by: gimley
2 Replies

8. Shell Programming and Scripting

Nested search in a file and replace the inner search

Hi Team, I am new to unix, please help me in this. I have a file named properties. The content of the file is : ##Mobile props east.url=https://qa.east.corp.com/prop/end west.url=https://qa.west.corp.com/prop/end south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies

9. Shell Programming and Scripting

Search and Replace in a new FILE.

Hi, more data.txt more srstring.sh input="data.txt" while IFS= read -r var do startdirectory=$loc search=$(echo $var | awk -F'=' '{print $1}') replace=$(echo $var | awk -F'=' '{print $2}') find "/tmp/config" -type f -exec grep -l "$search" {} + | while read file do if sed -e... (9 Replies)
Discussion started by: mohtashims
9 Replies

10. Shell Programming and Scripting

Replacing 12 columns of one file by second file based on mapping in third file

i have a real data prod file with 80+ fields containing 1k -2k records. i have to extract say 12 columns out of this which are sensitive fields along with one primary key say SEQ_ID (like DOB,account no, name, SEQ_ID, govtid etc) in a lookup file. i have to replace these sensitive fields in... (11 Replies)
Discussion started by: megh12
11 Replies
Bio::Tools::Run::Alignment::Gmap(3pm)			User Contributed Perl Documentation		     Bio::Tools::Run::Alignment::Gmap(3pm)

NAME
Bio::Tools::Run::Alignment::Gmap - Wrapper for running gmap. SYNOPSIS
use Bio::Tools::Run::Alignment::Gmap; use Bio::SeqIO; my $sio = Bio::SeqIO->new(-file=>$filename ,-format=>'fasta'); my @seq; while(my $seq = $sio->next_seq()){ push @seq,$seq; } my $mapper =Bio::Tools::Run::Gmap->new(); my $result = $mapper->run(@seq); DESCRIPTION
Bioperl-run wrapper around gmap. See <http://www.gene.com/share/gmap/> for information about gmap. It requires a reference to an array of bioperl SeqI objects and returns a reference to a filehandle from which the gmap output can be read. One can explicitly set the name of the genome database (defaults to NHGD_R36) using the 'genome_db()' method. One can also explicitly set the flags that are passed to gmap (defaults to '-f 9 -5 -e') using the 'flags()' method. The name of the gmap executable can be overridden using the program_name() method and the directory in which to find that executable can be overridden using the program_dir() method. 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/wiki/Mailing_lists - 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 the web: http://redmine.open-bio.org/projects/bioperl/ AUTHOR - George Hartzell Email hartzell@alerce.com Describe contact details here CONTRIBUTORS
Additional contributors names and emails here 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::Run::Alignment::Gmap(); Function: Builds a new Bio::Tools::Run::Alignment::Gmap object Returns : an instance of Bio::Tools::Run::Alignment::Gmap Args : version Title : version Usage : print "gmap version: " . $mapper->version() . " "; Function: retrieves and returns the version of the gmap package. Example : Returns : scalar string containing the version number. Probably looks like YYYY-MM-DD. Args : none. program_name Title : program_name Usage : $mapper->program_name('gmap-dev'); my $pname = $mapper->program_name(); Function: sets/gets the name of the program to run. Returns : string representing the name of the executable. Args : [optional] string representing the name of the executable to set. program_dir Title : program_dir Usage : $mapper->program_dir('/usr/local/sandbox/gmap/bin'); my $pdir = $mapper->program_dir(); Function: sets/gets the directory path in which to find the gmap executable. Returns : string representing the path to the directory. Args : [optional] string representing the directory path to set. input_file Title : input_file Usage : $mapper->input_file('/tmp/moose.fasta'); my $filename = $mapper->input_file(); Function: sets/gets the name of a file containing sequences to be mapped. Returns : string containing the name of the query sequence. Args : [optional] string representing the directory path to set. genome_db Title : genome_db Usage : $mapper->genome_db('NHGD_R36'); my $genome_db = $mapper->genome_db(); Function: sets/gets the name of the genome database, this will be passed to gmap using its '-d' flag. Returns : name of the genome database. Args : [optional] string representing the genome db to set. flags Title : flags Usage : $mapper->flags('-A -e -5'); my $flags = $mapper->flags(); Function: sets/gets the flags that will be passed to gmap. Returns : the current value of the flags that will be passed to gmap. Args : [optional] the flags to set. run Title : run Usage : $mapper->run() Function: runs gmap Example : Returns : a file handle, opened for reading, for gmap's output. Args : An array of references query sequences (as Bio::Seq objects) _build_fasta_input_file Title : _build_fasta_input_file Usage : my $seq_file = $self->_build_fasta_input_file(@_); Function: Example : Returns : The name of the temporary file that contains the sequence. Args : A reference to an array of Bio::Seq objects. perl v5.12.3 2011-06-18 Bio::Tools::Run::Alignment::Gmap(3pm)
All times are GMT -4. The time now is 07:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy