08-01-2006
hello and thanks for the fast reply
This is great solution I didn't know perl can take multiple patterns for separation
But one thing remains I also need to capture the patterns and put them into the array
What I mean is when I do the split I actually don't get the pattern, how can I keep it and push it to the array?
This User Gave Thanks to umen For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have gone through all the threads in the forum and tested out different things. I am trying to split a 3GB file into multiple files. Some files are even larger than this.
For example:
split -l 3000000 filename.txt
This is very slow and it splits the file with 3 million records in each... (10 Replies)
Discussion started by: madhunk
10 Replies
2. Shell Programming and Scripting
Hi All,
Can someone please help me write a script for the following requirement in awk, grep, sed or perl.
Buuuu xxx bbb
Kmmmm rrr ssss uuuu
Kwwww zzzz ccc
Roooowwww eeee
Bxxxx jjjj dddd
Kuuuu eeeee nnnn
Rpppp cccc vvvv cccc
Rhhhhhhyyyy tttt
Lhhhh rrrrrssssss
Bffff mmmm iiiii
Ktttt... (5 Replies)
Discussion started by: kumarn
5 Replies
3. Shell Programming and Scripting
Hello People,
Need some assistance/guidance.
OUTLINE:
Two files (File1 and File2)
File1 has some ids such as
009463_3922_1827
897654_8764_5432
File2 has things along the lines of:
Query= 009463_3922_1827 length=252
(252 letters)
More stufff here
... (5 Replies)
Discussion started by: Deep9000
5 Replies
4. Shell Programming and Scripting
Hi everyone, and thank you for your help with this. I am VERY new with perl so all of your help is appreciated. I have tried google but as I don't know the proper terms to search for and could be daunting for a newbie scripter... I know this is very easy for most of you! Thanks!
I have a... (4 Replies)
Discussion started by: sinusoid
4 Replies
5. Shell Programming and Scripting
I have a file with lines something like.
......
123_start
......
.......
123_end
....
.....
456_start
......
.....
456_end
....
.....
789_start
....
....
789_end (6 Replies)
Discussion started by: abinash
6 Replies
6. Shell Programming and Scripting
user 10
values
content is:
musage.py
yes
value
user 11
values
content is:
gusage.py
yes
value
how to print "user" string line by searching "content is:" string and "usage.py" string in perl (8 Replies)
Discussion started by: Anjan1
8 Replies
7. Shell Programming and Scripting
Hello, I am using awk to split a file into multiple files using command:
nawk '{
if ( $1 == "<process" )
{
n=split($2, arr, "\"");
file=arr
}
print > file }' processes.xml
<process name="Process1.process">
... (3 Replies)
Discussion started by: chiru_h
3 Replies
8. Shell Programming and Scripting
My example file is as given below:
conn=1 uid=oracle
conn=2 uid=db2
conn=3 uid=oracle
conn=4 uid=hash
conn=5 uid=skher
conn=6 uid=oracle
conn=7 uid=mpalkar
conn=8 uid=anarke
conn=9 uid=oracle
conn=1 op=-1 msgId=-1 - fd=104 slot=104 LDAPS connection from 10.10.5.6 to 10.18.6.5
conn=2... (3 Replies)
Discussion started by: sags007_99
3 Replies
9. Shell Programming and Scripting
I have one single shown below and I need to break each ST|850 & SE to separate file using unix script. Below example should create 3 files. We can use ST & SE to filter as these field names will remain same.
Please advice with the unix code.
ST|850
BEG|PO|1234
LIN|1|23
SE|4
ST|850... (3 Replies)
Discussion started by: prasadm
3 Replies
10. Shell Programming and Scripting
Hi,
I have a text file (attached the sample). I have also, attached the way the way the files need to be split.
We get this file, that will either have 24 Jurisdictions, or will miss some and retain some.
Like in the attached sample file, there are only Jurisdictions 03,11,14,15, 20 and 30.... (3 Replies)
Discussion started by: ebsus
3 Replies
LEARN ABOUT DEBIAN
tfbs::patterngen::elph
TFBS::PatternGen::Elph(3pm) User Contributed Perl Documentation TFBS::PatternGen::Elph(3pm)
NAME
TFBS::PatternGen::Elph - a pattern factory that uses the Elph program
SYNOPSIS
my $patterngen =
TFBS::PatternGen::Elph->new(-seq_file=>'sequences.fa',
-binary => '/Elph/elph'
-motif_length => [8, 9, 10],
-additional_params => '-x -r -e');
my $pfm = $patterngen->pattern(); # $pfm is now a TFBS::Matrix::PFM object
DESCRIPTION
TFBS::PatternGen::Gibbs builds position frequency matrices using an advanced Gibbs sampling algorithm implemented in external Gibbs program
by Chip Lawrence. The algorithm can produce multiple patterns from a single set of sequences.
new
Title : new
Usage : my $db = TFBS::PatternGen::Gibbs->new(%args);
Function: the constructor for the TFBS::PatternGen::Gibbs object
Returns : a TFBS::PatternGen::Gibbs object
Args : This method takes named arguments;
you must specify one of the following three
-seq_list # a reference to an array of strings
# and/or Bio::Seq objects
# or
-seq_stream # A Bio::SeqIO object
# or
-seq_file # the name of the fasta file containing
# all the sequences
Other arguments are:
-binary # a fully qualified path to Gibbs executable
# OPTIONAL: default 'Gibbs'
-nr_hits # a presumed number of pattern occurences in the
# sequence set: it can be a single integer, e.g.
# -nr_hits => 24 , or a reference to an array of
# integers, e.g -nr_hits => [12, 24, 36]
-motif_length # an expected length of motif in nucleotides:
# it can be a single integer, e.g.
# -motif_length => 8 , or a reference to an
# array ofintegers, e.g -motif_length => [8..12]
-additional_params # a string containing additional
# command-line switches for the
# Gibbs program
pattern
all_patterns
patternSet
The three methods listed above are used for the retrieval of patterns, and are common to all TFBS::PatternGen::* classes. Please see
TFBS::PatternGen for details.
perl v5.14.2 2008-01-24 TFBS::PatternGen::Elph(3pm)