The awk below does put in VUS in the 9th field but I can not seem to skip the header then add the VUS. I tried to incorporate NR >=2 and NR > 1 with no luck. Thank you .
input
current output
desired output
awk
Last edited by cmccabe; 08-01-2016 at 06:10 PM..
Reason: fixed format
Guys....
Got a scenario in which I need to skip parsing the header record while I do an awk.
Does awk has the flexibility to accomplish this?.
If so, how do we do this?.
Thanks !!!
-Anduzzi :) (2 Replies)
I have a file with millions of rows that I need to add a delimiter and a new field with a zero to the end of each row. (its too big to open and do a find and replace regex)
I'm looking for the next line '\n' and need to replace it with a Unit Separator (hex \037) 0 \n.
I've tried the... (2 Replies)
Dear all,
I have been trying to print an entire field, if the first line of the field is matching.
For example, my input looks something like this.
aaa ddd zzz
123 987 126
24 0.650 985
354 9864 0.32
0.333 4324 000
I am looking for a pattern,... (5 Replies)
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Hi! Is there a way to append column and row header to a file in awk script.
For example if I have
Jane F 39 manager
Carlos M 40 system administrator
Sam F 20 programmer
and I want it to be
# name gend age occup
1 Jane F 39 manager
2 Carlos M ... (4 Replies)
Hi,
I have an input like this
1 2 3 4
2 3 4 5
4 5 6 7
I would like to count the no. of columns and print a header with a prefix "Col".
I would also like to count the no. of rows and print as first column with each line number with a prefix "Row"
So, my output would be
... (2 Replies)
Greetings!
I have been trying to find out a way to take a CSV file with a large number of rows, and a very large number of columns (in the thousands) and convert the rows to a single column of data, where the first row is a header representing the attribute name and the subsequent series of... (3 Replies)
I am just trying to insert the word "Index" using awk. The below is close but seems to add the word at the end and I can not get the syntax correct to add from the beginning. Thank you :).
awk -F'\t' -v OFS='\t' '{ $-1=$-1 OFS "Index"}$1=$1' file
current output
Chr Start End ... (3 Replies)
I am trying to add a field header Inheritence in between $9 and $10 and default the value of each line to .. The below awk is close I think. Thanks :).
input
R_Index Chr Start End Ref Alt Func.IDP.refGene Gene.IDP.refGene ... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT DEBIAN
bio::liveseq::aarange
Bio::LiveSeq::AARange(3pm) User Contributed Perl Documentation Bio::LiveSeq::AARange(3pm)NAME
Bio::LiveSeq::AARange - AARange abstract class for LiveSeq
SYNOPSIS
#documentation needed
DESCRIPTION
This is used as possible parent for aminoacid range object classes. Or it can be used straight away to define aminoacid ranges. The idea
is that the ranges defined are attached to a Translation object and they refer to its coordinate-system when they are first created (via
the new() method). When they are created they are anyway linked to the underlying DNA LiveSeq by way of the LiveSeq labels. This allows to
preserve the ranges even if the numbering changes in the Translation due to deletions or insertions.
The protein sequence associated with the AARange can be accessed via the usual seq() or subseq() methods.
The start and end of the AARange in protein coordinate system can be fetched with aa_start() and aa_end() methods. Note: the behaviour of
these methods would be influenced by the coordinate_start set in the corresponding Translation object. This can be desirable but can also
lead to confusion if the coordinate_start had been changed and the original position of the AARange was to be retrieved.
start() and end() methods of the AARange will point to the labels identifying the first nucleotide of the first and last triplet coding for
the start and end of the AminoAcidRange.
The underlying nucleotide sequence of the AARange can be retrieved with the labelsubseq() method. This would retrieve the whole DNA
sequence, including possible introns. This is called "DNA_sequence".
To fetch the nucleotide sequence of the Transcript, without introns, the labelsubseq() of the attached Transcript (the Transcript the
Translation comes from) has to be accessed. This is called "cDNA_sequence".
Here are the operations to retrieve these latter two kinds of sequences:
$startlabel=$AARange->start;
$endtripletlabel=$AARange->end;
$endlabel=$AARange->{'seq'}->label(3,$endtripletlabel,$AARange->strand);
$dnaseq=$AARange->labelsubseq($startlabel,undef,$endlabel));
$cdnaseq=$AARange->get_Transcript->labelsubseq($startlabel,undef,$endlabel);
To simplify, these operations have been included in two additional methods: dna_seq() and cdna_seq().
These would return the whole sequence, as in the examples above. But the above general scheme can be used by specifying different labels,
to retrieve hypothetical subsequences of interest.
AUTHOR - Joseph A.L. Insana
Email: Insana@ebi.ac.uk, jinsana@gmx.net
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : new
Usage : $aarange = Bio::LiveSeq::AARange->new(-translation => $obj_ref,
-start => $beginaa,
-end => $endaa,
-name => "ABCD",
-description => "DCBA",
-translength => $length);
Function: generates a new AminoAcidRange LiveSeq object
Returns : reference to a new object of class AARange
Errorcode -1
Args : two positions in AminoAcid coordinate numbering
an object reference specifying to which translation the aminoacid
ranges refer to
a name and a description (optional)
an optional "translength" argument: this can be given when
a lot of AARanges are to be created at the same time for the same
Translation object, calculating it with $translation->length
This would increase the speed, avoiding the new() function to
calculate everytime the same length again and again for every obj.
get_Transcript
Title : valid
Usage : $transcript = $obj->get_Transcript()
Function: retrieves the reference to the object of class Transcript (if any)
attached to a LiveSeq object
Returns : object reference
Args : none
get_Translation
Title : valid
Usage : $translation = $obj->get_Translation()
Function: retrieves the reference to the object of class Translation (if any)
attached to a LiveSeq object
Returns : object reference
Args : none
aa_start
Title : aa_start
Usage : $end = $aarange->aa_start()
Returns : integer (position, according to Translation coordinate system) of
the start of an AminoAcidRange object
Args : none
aa_end
Title : aa_end
Usage : $end = $aarange->aa_end()
Returns : integer (position, according to Translation coordinate system) of
the end of an AminoAcidRange object
Args : none
dna_seq
Title : dna_seq
Usage : $end = $aarange->dna_seq()
Returns : the sequence at DNA level of the entire AminoAcidRange
this would include introns (if present)
Args : none
cdna_seq
Title : cdna_seq
Usage : $end = $aarange->cdna_seq()
Returns : the sequence at cDNA level of the entire AminoAcidRange
i.e. this is the part of the Transcript that codes for the
AminoAcidRange. It would be composed just of exonic DNA.
Args : none
perl v5.14.2 2012-03-02 Bio::LiveSeq::AARange(3pm)