Count Repetitive Number in a column and renumbering using awk


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Count Repetitive Number in a column and renumbering using awk
# 8  
Old 10-04-2018
Dear Mr. Don, thank you very much helping me in this regard.
Regards
Himanshu
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count number of unique values in each column of array

What is an efficient way of counting the number of unique values in a 400 column by 1000 row array and outputting the counts per column, assuming the unique values in the array are: A, B, C, D In other words the output should look like: Value COL1 COL2 COL3 A 50 51 52... (16 Replies)
Discussion started by: Geneanalyst
16 Replies

2. UNIX for Dummies Questions & Answers

count number of distinct values in each column with awk

Hi ! input: A|B|C|D A|F|C|E A|B|I|C A|T|I|B As the title of the thread says, I would need to get: 1|3|2|4 I tried different variants of this command, but I don't manage to obtain what I need: gawk 'BEGIN{FS=OFS="|"}{for(i=1; i<=NF; i++) a++} END {for (b in a) print b}' input ... (2 Replies)
Discussion started by: beca123456
2 Replies

3. Shell Programming and Scripting

Count number of characters in particular column

Hi i have data like abchd 124 ldskc aattggcc each separated by tab space i want to count number of characters in 4th column and print it in new column with tabspace for every line can anyone help me how to do it. Thanks. (3 Replies)
Discussion started by: bhargavpbk88
3 Replies

4. Shell Programming and Scripting

Count the number of fields in column

Hi I was going through the below thread https://www.unix.com/shell-programming-scripting/48535-how-count-number-fields-record.html I too have something similar requirement as specified in this thread but the number of columns in my case can be very high, so I am getting following error. ... (3 Replies)
Discussion started by: shekharjchandra
3 Replies

5. Shell Programming and Scripting

Count the number or row with same value in a column

This is the source file, we called it errorlist.out 196 server_a server_unix_2 CD 196 server_b server_win_1 CD 196 server_c server_win_2 CD 196 server_bd server_unix_2 CD 196 server_d server_unix_2 CD 196 server_es server_win_1 CD 196 ... (14 Replies)
Discussion started by: sQew
14 Replies

6. UNIX for Dummies Questions & Answers

count number of rows based on other column values

Could anybody help with this? I have input below ..... david,39 david,39 emelie,40 clarissa,22 bob,42 bob,42 tim,32 bob,39 david,38 emelie,47 what i want to do is count how many names there are with different ages, so output would be like this .... david,2 emelie,2 clarissa,1... (3 Replies)
Discussion started by: itsme999
3 Replies

7. Shell Programming and Scripting

to count the number of occurences of a column value

im trying to count the number of occurences of column 2 value(starting from KKK*) of the below file, file.txt using the code cat file.txt | awk ' BEGIN { print "Category Counts"} {FS=","} {NR > 2} { cats = cats + 1} END { for(c in cats) { print c, "=", cats} } ' but its returning as ... (6 Replies)
Discussion started by: michaelrozar17
6 Replies

8. UNIX for Dummies Questions & Answers

how to count number of rows and sum of column using awk

Hi All, I have the following input which i want to process using AWK. Rows,NC,amount 1,1202,0.192387 2,1201,0.111111 3,1201,0.123456 i want the following output count of rows = 3 ,sum of amount = 0.426954 Many thanks (2 Replies)
Discussion started by: pistachio
2 Replies

9. Shell Programming and Scripting

column renumbering

Hi, I am a beginner in awk scripting! I need your help; I want to replace the fifth column number (which is 15 here) here in this file for example : ATOM 142 N PRO A 15 ATOM 143 CD PRO A 15 ATOM 144 HD1 PRO A 15 ATOM ... (5 Replies)
Discussion started by: adak
5 Replies

10. Shell Programming and Scripting

Count if numbers are not repetitive

Hi All, I have an input below and i would want to do a count on all the term "aaa" and count only once if the number in first column is the same. For eg, if i use a "grep -c aaa input" command, the count will be "8". However, i would want the count to be "6" instead since 2 numbers in the 1st... (7 Replies)
Discussion started by: Raynon
7 Replies
Login or Register to Ask a Question
FASTX_QUALITY_STATS(1)						   User Commands					    FASTX_QUALITY_STATS(1)

NAME
fastx_quality_stats - FASTX Statistics DESCRIPTION
usage: fastx_quality_stats [-h] [-N] [-i INFILE] [-o OUTFILE] Part of FASTX Toolkit 0.0.13.2 by A. Gordon (gordon@cshl.edu) [-h] = This helpful help screen. [-i INFILE] = FASTQ input file. default is STDIN. [-o OUTFILE] = TEXT output file. default is STDOUT. [-N] = New output format (with more information per nucleotide/cycle). The *OLD* output TEXT file will have the following fields (one row per column): column = column number (1 to 36 for a 36-cycles read solexa file) count = number of bases found in this column. min = Lowest quality score value found in this column. max = Highest quality score value found in this column. sum = Sum of quality score values for this column. mean = Mean quality score value for this column. Q1 = 1st quartile quality score. med = Median quality score. Q3 = 3rd quartile quality score. IQR = Inter-Quartile range (Q3-Q1). lW = 'Left-Whisker' value (for boxplotting). rW = 'Right-Whisker' value (for boxplotting). A_Count = Count of 'A' nucleotides found in this column. C_Count = Count of 'C' nucleotides found in this column. G_Count = Count of 'G' nucleotides found in this column. T_Count = Count of 'T' nucleotides found in this column. N_Count = Count of 'N' nucleo- tides found in this column. max-count = max. number of bases (in all cycles) The *NEW* output format: cycle (previously called 'column') = cycle number max-count For each nucleotide in the cycle (ALL/A/C/G/T/N): count = number of bases found in this column. min = Lowest quality score value found in this column. max = Highest quality score value found in this column. sum = Sum of quality score values for this column. mean = Mean quality score value for this column. Q1 = 1st quartile quality score. med = Median quality score. Q3 = 3rd quartile quality score. IQR = Inter-Quartile range (Q3-Q1). lW = 'Left-Whisker' value (for boxplotting). rW = 'Right-Whisker' value (for boxplotting). SEE ALSO
The quality of this automatically generated manpage might be insufficient. It is suggested to visit http://hannonlab.cshl.edu/fastx_toolkit/commandline.html to get a better layout as well as an overview about connected FASTX tools. fastx_quality_stats 0.0.13.2 May 2012 FASTX_QUALITY_STATS(1)