first: u don't rly know how much words will use user isn't ?
so it can be "rna binding protein" or "protein binding rna mechanism started"
if so u have to make regexp using () to define every word as $1 $2 $3 etc then use them in search through array
second: i didn't got this "$regexp=~ s/\s+/[- \\s]/gi;" at all.. what should that mean?
u replacing every 1+ spaces of any kind (space,tab,end of line etc) with [- \\s] ??
i believe u was trying to do s/[- \\s]/ /g; but did wrong
try to use this for your specific case (when there's 3 words for search):
but still there can be many words or just 1 word so the code need more work on depending on your needs
Hi all,
I just learnt Perl and I encountered a problem in my current project.
For a verilog file, i am required to write a PERL script that could match pattern to output nitrolink and nitropack. I wont know what name to grep except the pattern below.
the verilog file:
nitrolink nitrolink... (1 Reply)
Hi,
If there exist multiple pattern in a file, how can I find the last record matching the pattern through perl.
The below script searches for the pattern everywhere in an input file.
#! /usr/bin/perl -s -wnl
BEGIN {
$pattern or
warn"Usage: $0 -pattern='RE' \n" and
exit 255;... (5 Replies)
Hi,
I have an array with 3 words in it and i have to match all the array contents and display the exact matched sentence i.e all 3 words should match with the sentence.
Here are sentences.
$arr1="Our data suggests that epithelial shape and growth control are unequally affected depending... (5 Replies)
For each value in file1 it has to check in file2 and file3.
If value matched it has to delete that value and related group value
in file2 and file3.
In this example it takes A , deletes A and take related group value 1 and
deletes E-1,then checks in file3 and deletes K-1.After that it takes D... (7 Replies)
Hi,
I want to match the time in the file and retrieve those contents of the file.
I am taking only first two parameters of localtime(time) function minutes and seconds so partial match i am performing.
For Example
$start = "14:23";
$end = "14:30";
I am matching file contents... (3 Replies)
Hi,
I have the file contents:
Start,End,Req,Resp
12:39,12:40,4,5
The sting to be matched is: Req and Resp.
parsefile("Req,Resp");
Here is the code.
sub parsefile ($)
{
$header=shift; (2 Replies)
hi dudes, I nee you kind assistance, I have to find the matched numbers from 2 text files and output of matched numbers should be in another text file..
I do have text files like this , for example
File 1
787
665*5-p
5454
545-p
445-p
5454*-p
File 2
5455
787
445-p
4356
2445
144
... (3 Replies)
Hi all,
I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Florida State University, Tallahassee, FL, USA, Dr. Whalley, COP4342 Unix Tools.
This program takes much of my previous assignment but adds the functionality of printing the concatenated line numbers found within the input.
Sample input from <> operator:
Hello World
This is hello
a sample... (2 Replies)
Hi,
I have script like below:
#!/usr/local/bin/perl
use strict;
use warnings;
while (<DATA>) {
( my ($s_id) = /^\d+\|(\d+?)\|/ ) ;
if ( $s_id == 1 ){
s/^(.*\|)*.*ABC\.pi=(+|+)*.*ABC\.id=(\d+|+).*$/$1$2|$3/s;
print "$1$2|$3\n"; (2 Replies)
Discussion started by: sol_nov
2 Replies
LEARN ABOUT DEBIAN
nps2gps
NPS2GPS(1) General Commands Manual NPS2GPS(1)NAME
nps2gps - convert nucleotide-protein sets to ASN.1 genomic product sets
SYNOPSIS
nps2gps [-] [-D] [-F] [-G str] [-L] [-N] [-P] [-Q] [-R] [-T] [-U] [-f str] [-i filename] [-o filename] [-p path] [-r path] [-x str]
DESCRIPTION
nps2gps converts NCBI Bioseq-sets from simple nucleotide-protein sets to full genomic product sets complete with mRNA transcripts, which it
outputs as text ASN.1.
OPTIONS
A summary of options is included below.
- Print usage message
-D RefSeq mRNA Titles
-F Map by Feature ID
-G str General ID database name
-L Lock components in advance
-N Promote Non-coding RNAs
-P mRNA ID from Protein
-Q Special mRNA titles
-R Enable Remote fetching from ID
-T Map by Transcript ID
-U Remove Unnecessary gene cross-references
-f str Substring filter
-i filename
Single input file (default = stdin)
-o filename
Single output file (default = stdout)
-p path
Path to files for batch conversion
-r path
Path for results of batch conversion
-x str File selection suffix for batch conversion (default = .ent)
AUTHOR
The National Center for Biotechnology Information.
SEE ALSO asn2asn(1), asn2ff(1), asn2gb(1), asn2xml(1), asndhuff(1).
NCBI Tools User's Manual 2012-06-24 NPS2GPS(1)