@Bartus
I have 2 questions about a script relating to the parts in red
1. How can I combine the two IF statements in the WHILE loop so that I get output only if those conditions are met.
2. How so I print sorted results of hash of hashes in the END part
Script
sample file for running script
I'm not able to figure it out, can you please enlighten on this?
Cheers and have a nice day
Hi,
I am trying to make a script that creates a list of all active (alive) processes sorted by size and then print this list on screen.
Could anyone help me?
Thaks a lot (7 Replies)
Hi -
I am guessing this is fairly simple for someone .. but I can not quite figure it out. I need a sed command to print just parts of lines from a file.
e.g. filea.txt
4710451 : Success : MODIFY : cn=user1,dc=org,dc=uk
Message log started
Message log ended
4710452 : Success : MODIFY :... (7 Replies)
Hey, I found a way to print the lines which is just before a regular expression, not including the expression.
sed -n '/regexp/{n;p;}' myfile
Now I'm looking for a way to print all lines, exept the regular expression and also the line before the same regular expression.
Use code tags. (1 Reply)
Hello,
I want to print a number of lines of a file after a specific expression of a line.
I have this sed command but it prints only 1 line after the expression.
How could I adapt it to print for instance 10 lines after or 15 lines after ?
sed -n '/regexp/{n;p;}'
Thx & Regs,
Rany. (5 Replies)
CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error.
source $CA_VERSION_DATA
if * ]
then
echo "CA_RELESE $CA_RELEASE is invalid"
exit -1
fi
+ source /etc/ncgl/ca_version_data
++ CA_PRODUCT_ID=samxts
++ CA_RELEASE=6
++ CA_WEEK_NO=7
++... (3 Replies)
Dear All,
I am trying to sort an array of numbers to retrieve the mimimum and maximum values of numbers in that array, by printing the first and last elements of the sorted array. My code is @sorted_numbers = sort (@numbers);
print "@sorted_numbers\n";
print "$sorted_numbers,... (0 Replies)
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
hi All ,
I am having a large file with lots of modules as shown below
###############################################
module KKK
kksd
kskks
jsn;lsm
jsnlsn;
Ring
jjsjsj
kskmsm
jjs
endmodule
module llll
1kksd11
k232skks
j33sn;l55sm (6 Replies)
Discussion started by: kshitij
6 Replies
LEARN ABOUT DEBIAN
bio::popgen::genotype
Bio::PopGen::Genotype(3pm) User Contributed Perl Documentation Bio::PopGen::Genotype(3pm)NAME
Bio::PopGen::Genotype - An implementation of GenotypeI which is just an allele container
SYNOPSIS
use Bio::PopGen::Genotype;
my $genotype = Bio::PopGen::Genotype->new(-marker_name => $name,
-individual_id => $indid,
-alleles => @alleles);
DESCRIPTION
This object will contain alleles for a given marker for a given individual.
The class variable BlankAlleles (accessible through $Bio::PopGen::Genotype::BlankAlleles = 'somepattern') can be set to a regexp pattern
for identifying blank alleles which should no be counted (they are effectively missing data). By default it set to match white space, '-',
'N' or 'n', and '?' as blank alleles which are skipped.
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
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 of the bugs and their resolution. Bug reports can be submitted via the
web:
https://redmine.open-bio.org/projects/bioperl/
AUTHOR - Jason Stajich
Email jason-at-bioperl.org
CONTRIBUTORS
Matthew Hahn, matthew.hahn-at-duke.edu
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 = Bio::PopGen::Genotype->new();
Function: Builds a new Bio::PopGen::Genotype object
Returns : an instance of Bio::PopGen::Genotype
Args : -marker_name => string representing name of the marker
-individual_id => string representing individual id (optional)
-alleles => arrayref with each item in the array being an allele
marker_name
Title : marker_name
Usage : my $name = $genotype->marker_name();
Function: Get the marker name for a genotype result
Returns : string
Args : [optional] marker name value to store
individual_id
Title : individual_id
Usage : my $indid = $genotype->individual_id();
Function: Gets the individual id associated with a genotype
This is effectively a back reference since we will typically
associate a genotype with an individual with an
individual HAS-A genotype relationship.
Returns : unique id string for an individual
Args : none
get_Alleles
Title : get_Alleles
Usage : my @alleles = $genotype->get_Alleles();
Function: Get the alleles for a given marker and individual
Returns : array of alleles (strings in this implementation)
Args : $showblank - boolean flag to indicate return ALL alleles not
skipping the coded EMPTY alleles
Note : Uses the class variable $BlankAlleles to test if alleles
should be skipped or not.
add_Allele
Title : add_Allele
Usage : $genotype->add_Allele(@alleles);
Function: Add alleles to the genotype, at this point there is no
verification to insure that haploid individuals only have 1
allele or that diploids only have 2 - we assume that is
done by the user creating these objects
Returns : count of the number of alleles in genotype
Args : Array of alleles to store
reset_Alleles
Title : reset_Alleles
Usage : $genotype->reset_Alleles;
Function: Resets the stored alleles so the list is empty
Returns : None
Args : None
perl v5.14.2 2012-03-02 Bio::PopGen::Genotype(3pm)