Search Results

Search: Posts Made By: raj_k
921
Posted By Akshay Hegde
$ awk '{s=$NF; sub(s,x); A[$0] = A[$0] ? A[$0]...
$ awk '{s=$NF; sub(s,x); A[$0] = A[$0] ? A[$0] OFS s : s}END{for(i in A)print i,A[i]}' file
$ awk '{s=$NF; sub(s,x)} FNR==NR{A[$0] = A[$0] ? A[$0] OFS s : s;next}($0 in A){print $0,A[$0];delete...
921
Posted By Scrutinizer
Try: awk '{i=$1 FS $2; $1=$2=x; sub(FS,x)}...
Try:
awk '{i=$1 FS $2; $1=$2=x; sub(FS,x)} p!=i{if(NR>1) print p A[p]; p=i} {A[i]=A[i] $0} END{print p A[p]}' file
2,577
Posted By MadeInGermany
The following seems to perform a correct merge. ...
The following seems to perform a correct merge.
The overlap function has -le (less or equal) that means "equal boundaries is an overlap". Otherwise must be -lt (less than).
I left some debug code...
2,528
Posted By Akshay Hegde
We shall replace sub with gsub, here is code ...
We shall replace sub with gsub, here is code

$ awk 'gsub(/_(intron|exon)_([[:digit:]]+)_([[:upper:]])/, x) + 1' file
Id1 chr9 fox12 chr9 56 72 72660772 H3K4ME2_E 726 72...
2,528
Posted By Akshay Hegde
You may try Awk $ awk...
You may try Awk
$ awk 'gsub(/_(exon|intron).*/,x)' file$ sed 's/_intron\|_exon.*//g' file
1,193
Posted By RudiC
Try also:awk 'NR==FNR{T[$4]=$1 FS $2 FS $3; next}...
Try also:awk 'NR==FNR{T[$4]=$1 FS $2 FS $3; next} {print $0, T[$1], T[$2]}' file2 file1
AFF3 BCL2 chr1 38177326 38664955 chr6 39603236 39725463
AGTRAP BRAF chr4 148077060 148088064 chr6...
1,193
Posted By Yoda
awk ' NR == FNR { ...
awk '
NR == FNR {
A[$1 OFS $2]
next
}
/^chr[0-9]/ {
for ( k in A )
{
split ( k,...
2,393
Posted By Jotne
Try this awk ' /^GN/...
Try this
awk '
/^GN/ {split($0,a,"[=;]");printf "\n%s|",a[2]}
/^RC/ {split($0,a,"=");printf a[2];f=1}
/^CC/ {if (f) {printf "|"};sub(/-!- FUNCTION:/,x);split($0,a," +");printf "%s ",a[2];f=0}...
2,393
Posted By Jotne
awk '{print $1}' output_file GN YWHAB YWHAE...
awk '{print $1}' output_file
GN
YWHAB
YWHAE

If you only need GN names, no need for all the above, just do:
awk -F"[=;]" '/^GN/ {print $2}' orgfile
YWHAB
YWHAE
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 10:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy