Sponsored Content
Special Forums UNIX Desktop Questions & Answers Extracting only unique data between two columns Post 302595137 by houkto on Thursday 2nd of February 2012 07:34:56 AM
Old 02-02-2012
Question Extracting only unique data between two columns

SmilieHi there,

I am trying to extract/filter a unique data between specific columns from a tab deliminated file, that has a number of columns:

input file as follow:
Code:
5       rs1       70        A        C       7       1       1        Blue
5       rs9       66        A        E       7        0       2 Green
1       rs0       41        B        R       3        0      0        Red
1       rs2        30        B        R       3        2      1       Red

I want to filter the common values on the 7th and 8th columns and extract/keep all the other strings that are unique in values between the 7th and the 8th columns. To be like this

Output
Code:
5       rs9       66        A        E       7        0       2 Green
1       rs2        30        B        R       3        2      1       Red

N.B the values in the 7th and 8th columns range are 0-1-2
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting records with unique fields from a fixed width txt file

Greetings, I would like to extract records from a fixed width text file that have unique field elements. Data is structured like this: John A Smith NY Mary C Jones WA Adam J Clark PA Mary Jones WA Fieldname / start-end position Firstname 1-10... (8 Replies)
Discussion started by: sitney
8 Replies

2. Shell Programming and Scripting

extracting unique lines from text file

I have a file with 14million lines and I would like to extract all the unique lines from the file into another text file. For example: Contents of file1 happy sad smile happy funny sad I want to run a command against file one that only returns the unique lines (ie 1 line for happy... (3 Replies)
Discussion started by: soliberus
3 Replies

3. Shell Programming and Scripting

Extracting Text Between Two Unique Lines

Hi all! Im trying to extract a portion of text from a file and put it into a new file. I need all the lines between <Placement> and </Placement> including the Placemark lines themselves. Is there a way to extract all instances of these and not just the first one found? I've tried using sed and... (4 Replies)
Discussion started by: Grizzly
4 Replies

4. Shell Programming and Scripting

awk : extracting unique lines based on columns

Hi, snp.txt CHR_A SNP_A BP_A_st BP_A_End CHR_B BP_B SNP_B R2 p-SNP_A p-SNP_B 5 rs1988728 74904317 74904318 5 74960646 rs1427924 0.377333 0.000740085 0.013930081 5 ... (12 Replies)
Discussion started by: genehunter
12 Replies

5. Shell Programming and Scripting

Extracting several lines of text after a unique string

I'm attempting to write a script to identify users who have sudo access on a server. I only want to extract the ID's of the sudo users after a unique line of text. The list of sudo users goes to the EOF so I only need the script to start after the unique line of text. I already have a script to... (1 Reply)
Discussion started by: bouncer
1 Replies

6. Shell Programming and Scripting

How to merge columns into lines, using unique keys?

I would really appreciate a sulution for this : invoice# client# 5929 231 4358 231 2185 231 6234 231 1166 464 1264 464 3432 464 1720 464 9747 464 1133 791 4930 791 5496 791 6291 791 8681 989 3023 989 (2 Replies)
Discussion started by: hemo21
2 Replies

7. Shell Programming and Scripting

Print unique records in 2 columns using awk

Is it possible to print the records that has only 1 value in 2nd column. Ex: input awex1 1 awex1 2 awex1 3 assww 1 ader34 1 ader34 2 output assww 1 (5 Replies)
Discussion started by: quincyjones
5 Replies

8. Shell Programming and Scripting

Extracting unique values of a column from a feed file

Hi Folks, I have the below feed file named abc1.txt in which you can see there is a title and below is the respective values in the rows and it is completely pipe delimited file ,. ... (4 Replies)
Discussion started by: punpun66
4 Replies

9. Shell Programming and Scripting

Extracting data from specific rows and columns from multiple csv files

I have a series of csv files in the following format eg file1 Experiment Name,XYZ_07/28/15, Specimen Name,Specimen_001, Tube Name, Control, Record Date,7/28/2015 14:50, $OP,XYZYZ, GUID,abc, Population,#Events,%Parent All Events,10500, P1,10071,95.9 Early Apoptosis,1113,11.1 Late... (6 Replies)
Discussion started by: pawannoel
6 Replies
GLGETSEPARABLEFILTER(3G)												  GLGETSEPARABLEFILTER(3G)

NAME
glGetSeparableFilter - get separable convolution filter kernel images C SPECIFICATION
void glGetSeparableFilter( GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ) PARAMETERS
target The separable filter to be retrieved. Must be GL_SEPARABLE_2D. format Format of the output images. Must be one of GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_BGR GL_RGBA, GL_BGRA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA. type Data type of components in the output images. Symbolic constants GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV are accepted. row Pointer to storage for the row filter image. column Pointer to storage for the column filter image. span Pointer to storage for the span filter image (currently unused). DESCRIPTION
glGetSeparableFilter returns the two one-dimensional filter kernel images for the current separable 2D convolution filter. The row image is placed in row and the column image is placed in column according to the specifications in format and type. (In the current implementa- tion, span is not affected in any way.) No pixel transfer operations are performed on the images, but the relevant pixel storage modes are applied. Color components that are present in format but not included in the internal of the filters are returned as zero. The assignments of internal color components to the components of format are as follows: ----------------------------------------- Internal Component Resulting Component ----------------------------------------- Red Red Green Green Blue Blue Alpha Alpha Luminance Red Intensity Red ----------------------------------------- NOTES
glGetSeparableFilter is present only if GL_ARB_imaging is returned when glGetString is called with an argument of GL_EXTENSIONS. Non-separable 2D filters must be retrieved with glGetConvolutionFilter. ERRORS
GL_INVALID_ENUM is generated if target is not GL_SEPARABLE_2D. GL_INVALID_ENUM is generated if format is not one of the allowable values. GL_INVALID_ENUM is generated if type is not one of the allowable values. GL_INVALID_OPERATION is generated if glGetSeparableFilter is executed between the execution of glBegin and the corresponding execution of glEnd. GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is not GL_RGB. GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and format is neither GL_RGBA nor GL_BGRA. ASSOCIATED GETS
glGetConvolutionParameter SEE ALSO
glGetConvolutionFilter(3G), glConvolutionParameter(3G), glSeparableFilter2D(3G) GLGETSEPARABLEFILTER(3G)
All times are GMT -4. The time now is 11:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy