Hi,
Suppose if i am having a file with following records as given below.
5555
6756
5555
4555
4555
6767
how can i get the count of each record using AWK.
Eg:5555 count should be 2
4555 count should be 2
6767 count should be 1
... (5 Replies)
Hi everybody,
I'm trying to replace the $98 field with "T" if the last field (108th) is T
I've tried
awk 'BEGIN{OFS=FS="|"} {if ($108=="T")sub($98,"T"); print}' test.txt
but that doesn't do anything
also tried
awk 'BEGIN{OFS=FS="|"}{ /*T.$/ sub($98,"T")} { print}' test.txt
but... (2 Replies)
Hi,
let's say an input looks like:
A|C|C|D
A|C|I|E
A|B|I|C
A|T|I|B
as the title of the thread explains, I am trying to get something like:
1|A=4
2|C=2|B=1|T=1
3|I=3|C=1
4|D=1|E=1|C=1|B=1
i.e. a count of every character in each field (first column of output) independently, sorted... (4 Replies)
Hi,
I have a file like below
PRUM,67016800 ,CC ,C1,67016800 , ,Y,Y,2 ,CK,BX,FOX ,00000001,EA,00000001,20141120 00:00:00, ,N,Y,Y,CK ABCDEF... (7 Replies)
Hi Folks,
I have a file with fields as follows which has last field in multiple lines. I would like to combine a line which has three fields with single field line for as shown in expected output. Please help.
INPUT
hname01 windows appnamec1eda_p1, ... (5 Replies)
I am trying to remove all the lines and spaces where the count in $4 or $5 is greater than 1 (more than 1 letter). The file and the output are tab-delimited. Thank you :).
file
X 5811530 . G C NLGN4X
17 10544696 . GA G MYH3
9 96439004 . C ... (1 Reply)
In the awk below I am trying to copy the entire contents of $6 there may be multiple values seperated by a ;, to $8, if $8 is . (lines 1 and 3 are examples). If that condition $8 is not . (line2 is an example) then that line is skipped and printed as is. The awk does execute but prints the output... (3 Replies)
The below awk executes as is and produces the current output. It isvery close but what Ican not seem to do is add the -exon..., the ... portion comes from $1 and the _exon is static and will never change. If there is + sign in $4 then the ... is in acending order or sequential. If there is a - in... (2 Replies)
Hi,
Sure it's an easy one, but it drives me insane.
input ("|" separated):
1|A,B,C,A
2|A,D,D
3|A,B,B
I would like to count the occurence of each capital letters in $2 across the entire file, knowing that duplicates in each record count as 1.
I am trying to get this output... (5 Replies)
Hi,
So awk is driving me crazy on this one. I have searched everywhere and read man, docs and every related post Google can find and still no luck. The actual files I need to run this on are sensitive in nature, but it is the same thing as if I needed to calculate weighted grades for multiple... (15 Replies)
Discussion started by: cotilloe
15 Replies
LEARN ABOUT DEBIAN
bio::variation::snp
Bio::Variation::SNP(3pm) User Contributed Perl Documentation Bio::Variation::SNP(3pm)NAME
Bio::Variation::SNP - submitted SNP
SYNOPSIS
$SNP = Bio::Variation::SNP->new ();
DESCRIPTION
Inherits from Bio::Variation::SeqDiff and Bio::Variation::Allele, with additional methods that are (db)SNP specific (ie, refSNP/subSNP IDs,
batch IDs, validation methods).
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
Allen Day <allenday@ucla.edu>
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
get/set-able methods
Usage : $is = $snp->method()
Function: for getting/setting attributes
Returns : a value. probably a scalar.
Args : if you're trying to set an attribute, pass in the new value.
Methods:
--------
id
type
observed
seq_5
seq_3
ncbi_build
ncbi_chr_hits
ncbi_ctg_hits
ncbi_seq_loc
ucsc_build
ucsc_chr_hits
ucsc_ctg_hits
heterozygous
heterozygous_SE
validated
genotype
handle
batch_id
method
locus_id
symbol
mrna
protein
functional_class
is_subsnp
Title : is_subsnp
Usage : $is = $snp->is_subsnp()
Function: returns 1 if $snp is a subSNP
Returns : 1 or undef
Args : NONE
subsnp
Title : subsnp
Usage : $subsnp = $snp->subsnp()
Function: returns the currently active subSNP of $snp
Returns : Bio::Variation::SNP
Args : NONE
add_subsnp
Title : add_subsnp
Usage : $subsnp = $snp->add_subsnp()
Function: pushes the previous value returned by subsnp() onto a stack,
accessible with each_subsnp().
Sets return value of subsnp() to a new Bio::Variation::SNP
object, and returns that object.
Returns : Bio::Varitiation::SNP
Args : NONE
each_subsnp
Title : each_subsnp
Usage : @subsnps = $snp->each_subsnp()
Function: returns a list of the subSNPs of a refSNP
Returns : list
Args : NONE
perl v5.14.2 2012-03-02 Bio::Variation::SNP(3pm)