I am using awk as part of and if then else statement. I am trying to have the user enter a gene name and then a variant or variants and have a specific transcript assigned to the variants depending on the gene. Below is my code but the if then else statement is wrong. Basically, the gene name would be the condition that assigns a particular transcript to a variant.
The desired output would be, if the user enters GJB2 as the gene name and then c.283G>A for the variant there is a statement for that condition that saves a file with NM_004004.5:c.283G>A . However if MECP2 is entered as the gene name and c.48delC,c.255G>T are entered as the variants, the a file is saved:
Hi Friends
How do I do two things from one if statement inside awk? I want to run a script and create a new file from the same condition.
awk '{ if ($2 == ""){print " "|"cd /local/test; ./script.ksh"}{cat > ran_true.txt}}' $IN_FILE
Bolded are the two things I want to be done.
Thanks (1 Reply)
Having a little trouble with awk and an if statement. I have a test setup which I am trying to only print the records which start with the month 03. Everything I tried, prints everything, even the 02 month
03/23/2010 12:47:51
ga2828
SUBMITTED FROM URL: test123.cgi
show port count
... (2 Replies)
Hi,
I have a data file which contains record count.
So doing wc -l rightfit_balancing_count.dat | awk '{print $1}'] gives me the record count stored in the file.
Now, i want to send a mail from UNIX, if the record count is equal to 0,otherwise it should do nothing.
Any help... (2 Replies)
hi,
I have a l-column file of more than 10,000 lines with interspersed negative values. What I want to do is add a fixed number (360) everytime a negative value is encountered while leaving the positive ones as is. I need something that will read every line of the file and do the calculation... (3 Replies)
Hi
I have a file with
test test2 1000000657373
test1 test3 1000003849450
test2 test4 test5 100000837474
I cat the file and pipe it to an awk statement like so
cat /tmp/file |awk '{if ($3 ~ "^*$" && $3 > 1024000000) print "/vol/"$1"/"$2;else if ($4 ~ "^*$" && $4 > 1024000000) print... (15 Replies)
I run my script "switch.sh" repeatedly (within 30 seconds). Each time script is triggered, script itself should kill all previous process.
Here is my code:
for pid in $(ps -fe | grep 'switch.sh' | grep -v grep | awk '{if ($2<$$) print $2}'); do
sudo kill -9 $pid
done
sleep 30
... (6 Replies)
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
There has to be a way to do this with awk or maybe I'm just focusing on the wrong tool and making this harder than it needs to be.
I'm trying to do a file field lookup/join at a very large scale but the output changes has to change dramatically. I have an input file to do a field lookup from and... (3 Replies)
Discussion started by: brettcasper
3 Replies
LEARN ABOUT DEBIAN
bio::seqfeature::gene::genestructurei
Bio::SeqFeature::Gene::GeneStructureI(3pm) User Contributed Perl Documentation Bio::SeqFeature::Gene::GeneStructureI(3pm)NAME
Bio::SeqFeature::Gene::GeneStructureI - A feature representing an arbitrarily
complex structure of a gene
SYNOPSIS
#documentation needed
DESCRIPTION
A feature representing a gene structure.
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 - Hilmar Lapp
Email hlapp@gmx.net
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
transcripts
Title : transcripts()
Usage : @transcripts = $gene->transcripts();
Function: Get the transcript features/sites of this gene structure.
See Bio::SeqFeature::Gene::TranscriptI for properties of the
returned objects.
Returns : An array of Bio::SeqFeature::Gene::TranscriptI implementing objects
representing the promoter regions or sites.
Args :
promoters
Title : promoters()
Usage : @prom_sites = $gene->promoters();
Function: Get the promoter features/sites of this gene structure.
Note that OO-modeling of regulatory elements is not stable yet.
This means that this method might change or even disappear in a
future release. Be aware of this if you use it.
Returns : An array of Bio::SeqFeatureI implementing objects representing the
promoter regions or sites.
Args :
exons
Title : exons()
Usage : @exons = $gene->exons();
@inital = $gene->exons('Initial');
Function: Get all exon features or all exons of specified type of this gene
structure.
Refer to the documentation of the class that produced this gene
structure object for information about the possible types.
See Bio::SeqFeature::Gene::ExonI for properties of the
returned objects.
Returns : An array of Bio::SeqFeature::Gene::ExonI implementing objects
representing the exon regions.
Args : An optional string specifying the type of the exon.
introns
Title : introns()
Usage : @introns = $gene->introns();
Function: Get all introns of this gene structure.
Returns : An array of Bio::SeqFeatureI implementing objects representing the
introns.
Args :
poly_A_sites
Title : poly_A_sites()
Usage : @polyAsites = $gene->poly_A_sites();
Function: Get the poly-adenylation features/sites of this gene structure.
Returns : An array of Bio::SeqFeatureI implementing objects representing the
poly-adenylation regions or sites.
Args :
utrs
Title : utrs()
Usage : @utr_sites = $gene->utrs();
Function: Get the UTR features/sites of this gene structure.
See Bio::SeqFeature::Gene::ExonI for properties of the
returned objects.
Returns : An array of Bio::SeqFeature::Gene::ExonI implementing objects
representing the UTR regions or sites.
Args :
perl v5.14.2 2012-03-02 Bio::SeqFeature::Gene::GeneStructureI(3pm)