Sponsored Content
Full Discussion: Duplication | awk | result
Top Forums UNIX for Beginners Questions & Answers Duplication | awk | result Post 303035767 by Aurimas on Sunday 2nd of June 2019 11:23:07 AM
Old 06-02-2019
The output of the output of voronota get-balls-from-atoms-file --annotated for a certain .pdb file or input to awk looks like this (a sample, not full dataset) by your given code script:

Code:
c<B>r<4>a<2302>R<ARG>A<N> 6.162 10.557 -25.517 1.55 el=N oc=1;tf=23.17
c<B>r<4>a<2303>R<ARG>A<CA> 6.64 9.248 -25.115 1.7 el=C oc=1;tf=22.23
c<B>r<4>a<2304>R<ARG>A<C> 8.15 9.068 -25.176 1.7 el=C oc=1;tf=24.84
c<B>r<4>a<2305>R<ARG>A<O> 8.73 8.531 -24.211 1.52 el=O oc=1;tf=28.35
c<B>r<4>a<2306>R<ARG>A<CB> 5.934 8.193 -25.972 1.7 el=C oc=1;tf=22.92
c<B>r<4>a<2307>R<ARG>A<CG> 6.32 6.769 -25.634 1.7 el=C oc=1;tf=24.7
c<B>r<4>a<2308>R<ARG>A<CD> 5.685 5.754 -26.618 1.7 el=C oc=1;tf=25.75
c<B>r<4>a<2309>R<ARG>A<NE> 6.077 4.394 -26.252 1.55 el=N oc=1;tf=26.94
c<B>r<4>a<2310>R<ARG>A<CZ> 5.167 3.427 -26.057 1.7 el=C oc=1;tf=26.16
c<B>r<4>a<2311>R<ARG>A<NH1> 3.872 3.686 -26.225 1.55 el=N oc=1;tf=27.03
c<B>r<4>a<2312>R<ARG>A<NH2> 5.545 2.228 -25.597 1.55 el=N oc=1;tf=25.32
c<B>r<5>a<2313>R<SER>A<N> 8.88 9.496 -26.216 1.55 el=N oc=1;tf=24.85
c<B>r<5>a<2314>R<SER>A<CA> 10.339 9.288 -26.237 1.7 el=C oc=1;tf=22.66
c<B>r<5>a<2315>R<SER>A<C> 11.054 10.197 -25.23 1.7 el=C oc=1;tf=20.28
c<B>r<5>a<2316>R<SER>A<O> 12.051 9.828 -24.609 1.52 el=O oc=1;tf=17.58
c<B>r<5>a<2317>R<SER>A<CB> 10.87 9.554 -27.656 1.7 el=C oc=1;tf=21.53
c<B>r<5>a<2318>R<SER>A<OG> 10.523 10.853 -28.157 1.52 el=O oc=1;tf=18.21
c<B>r<6>a<2319>R<ASP>A<N> 10.514 11.396 -25.053 1.55 el=N oc=1;tf=22.4
c<B>r<6>a<2320>R<ASP>A<CA> 11.025 12.347 -24.083 1.7 el=C oc=1;tf=25.02
c<B>r<6>a<2321>R<ASP>A<C> 10.878 11.83 -22.661 1.7 el=C oc=1;tf=27.57
c<B>r<6>a<2322>R<ASP>A<O> 11.874 11.789 -21.917 1.52 el=O oc=1;tf=27.98
c<B>r<6>a<2323>R<ASP>A<CB> 10.289 13.663 -24.272 1.7 el=C oc=1;tf=26.54
c<B>r<6>a<2324>R<ASP>A<CG> 10.869 14.511 -25.413 1.7 el=C oc=1;tf=28.35
c<B>r<6>a<2325>R<ASP>A<OD1> 11.913 14.194 -25.989 1.52 el=O oc=1;tf=30.42
c<B>r<6>a<2326>R<ASP>A<OD2> 10.264 15.523 -25.731 1.52 el=O oc=1;tf=29.8

but I want the output to awk through grep -o -i "$AAA" | wc -l | be a string that is later converted to integer, but if it is possible to avoid it - then that would be great.

I need to extract count of amino acids (ARG, SER, ASP in this case) but maybe it is possible from the script you shown before?

Hope this is what you asked Smilie

Last edited by Scrutinizer; 06-06-2019 at 12:38 PM.. Reason: quote tags -> code tags and icode tags
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

File Duplication

hi all how to find the file duplication in a windows 2000 server as usual replies are sincerely appreciated. thanks raguram R (3 Replies)
Discussion started by: raguramtgr
3 Replies

2. HP-UX

awk to output cmd result

I was wondering if it was possible to tell awk to print the output of a command in the print. .... | awk '{print $0}' I would like it to print the date right before $0, so something like (this doesn't work though) .... | awk '{print date $0}' (4 Replies)
Discussion started by: IMTheNachoMan
4 Replies

3. UNIX for Advanced & Expert Users

mount LVM duplication drives

Hi, I'm stuck in an awkward situation please help :) I have two identical Seagate 80GB harddrives. My objective is a bit strange. 1.I want to have a cloned disk as bootable backup 2.When booting using the master drive, I also want to mount the cloned backup disk so I can do incremental... (6 Replies)
Discussion started by: onthetopo
6 Replies

4. Shell Programming and Scripting

File Duplication Script?

I have a file, let's say 1.jpg, and I have a text file that contains a list of filenames I would like to duplicate 1.jpg as (i.e., 2.jpg, 3.jpg, 4.jpg, etc.). The filenames that I want to create are all on separate lines, one per line. I'm sure there's a simple solution, but I'm not claiming to... (7 Replies)
Discussion started by: futurestar
7 Replies

5. Shell Programming and Scripting

How to avoid duplication within 2 files?

Hi all, Actually 2 files are there - file1, file2. file1 contains ---> london mosco america russia mosco file2 contains --> europe india japan mosco england london Question is I want to print all the city names without duplication cities in those... (10 Replies)
Discussion started by: balan_mca
10 Replies

6. UNIX for Advanced & Expert Users

File Descriptor redirection and duplication

i have many questions concerning the FD. it was stated that "to redirect Error to output std, you have to write the following code" # ls -alt FileNotThere File > logfile 2>&1 # cat logfile ls: cannot access FileNotThere: No such file or directory -rw-r--r-- 1 root root 0 2010-02-26... (9 Replies)
Discussion started by: ahmad.zuhd
9 Replies

7. Programming

Table Duplication in PHP

Hey, I am making a Facebook like Page system as my first project, So far it's been bate in mind I did it from my 3DS at the same time as my PC gets replaced, So far it's turned out great. Now I am on to creation the blocking system I need to get the code to say If the user already likes the... (0 Replies)
Discussion started by: AimyThomas
0 Replies

8. Linux

De-Duplication Problem

Hi all, I download and install lessfs for deduplication, I copy files in /SharedFiles directory and lessfs work right and not store again copy files, but, when i delete all files in /SharedFiles , not return free space to total space, files not show in /SharedFiles , but not copy new files in... (3 Replies)
Discussion started by: saeedha
3 Replies

9. UNIX for Beginners Questions & Answers

Line duplication with awk?!

So while this seemed totally trivial it turned out to be much more difficult than I had thought. I have a file with 3 rows, and I "just" want to add each field n number of times. E.g. > cat file.txt 0.5 -0.1 0.6 for n=3 into: cat newfile.txt 0.5 0.5 0.5 -0.1 -0.1 -0.1 0.6 0.6 0.6 I... (4 Replies)
Discussion started by: Glorp
4 Replies

10. UNIX for Beginners Questions & Answers

Unexpected result from awk

Hello, Giving those commands: cat > myfile 1 2 3 ^D cat myfile | awk '{ s=s+$1 ; print s}' The output is: 1 3 6 It seems like this command iterates each time on a different row so $1 is the first field of each row.. But what caused it to refer to each row ?. What I mean... (3 Replies)
Discussion started by: uniran
3 Replies
IGAWK(1)							 Utility Commands							  IGAWK(1)

NAME
igawk - gawk with include files SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ... igawk [ all gawk options ] [ -- ] program-text file ... DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1). AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like @include getopt.awk in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path. OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports. EXAMPLES
cat << EOF > test.awk @include getopt.awk BEGIN { while (getopt(ARGC, ARGV, "am:q") != -1) ... } EOF igawk -f test.awk SEE ALSO
gawk(1) Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995. AUTHOR
Arnold Robbins (arnold@skeeve.com). Free Software Foundation Nov 3 1999 IGAWK(1)
All times are GMT -4. The time now is 09:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy