Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Finding common entries between 10 columns Post 303002517 by Sanchari on Saturday 26th of August 2017 06:26:55 AM
Old 08-26-2017
Finding common entries between 10 columns

Hello, I need to find the intersection across 10 columns. Kindly help.

my file (INPUT.csv) looks like this
Code:
 4_R         4_S         8_R         8_S         12_R         12_S         24_R         24_S  
LOC_Os01g01010 LOC_Os01g01010 LOC_Os01g01010 LOC_Os04g48290 LOC_Os01g01010 LOC_Os01g01010 LOC_Os01g01010 LOC_Os04g48290
LOC_Os01g01019 LOC_Os01g01019 LOC_Os01g01019 LOC_Os05g39580 LOC_Os01g01019 LOC_Os01g01019 ChrSy.fgenesh.gene.29 LOC_Os05g39580
LOC_Os01g01019 LOC_Os01g01019 LOC_Os01g01019 LOC_Os05g39580 LOC_Os01g01019 LOC_Os01g01019 ChrSy.fgenesh.gene.29 LOC_Os05g39580
                                                                                   LOC_Os01g01010                                                                                            ChrSy.fgenesh.gene.29
                                                                                                                                                                                                          LOC_Os01g01010

There can be duplicate entries and the no. of entries in each column can be different.

Last edited by Scrutinizer; 08-26-2017 at 09:12 AM.. Reason: Added closing code tag
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding the most common entry in a column

Hi, I have a file with 3 columns in it that are comma separated and it has about 5000 lines. What I want to do is find the most common value in column 3 using awk or a shell script or whatever works! I'm totally stuck on how to do this. e.g. value1,value2,bob value1,value2,bob... (12 Replies)
Discussion started by: Donkey25
12 Replies

2. Solaris

Comparing the common columns of a table in two files

Hi, I have two text files.The first and the 2nd file have data in the same format For e.g. The first file has BOOKS COUNT: 40 BOOKS AUTHOR1 SUM:1018 MAX:47 MIN:1 AVG:25.45 BOOKS AUTHOR3 SUM:181 MAX:48 MIN:3 AVG:18.1 Note:Read it as Table columnname sum(column) max(column) min(column)... (1 Reply)
Discussion started by: ragavhere
1 Replies

3. Shell Programming and Scripting

Finding longest common substring among filenames

I will be performing a task on several directories, each containing a large number of files (2500+) that follow a regular naming convention: YYYY_MM_DD_XX.foo_bar.A.B.some_different_stuff.EXT What I would like to do is automatically discover the part of the filenames that are common to all... (1 Reply)
Discussion started by: cmcnorgan
1 Replies

4. Shell Programming and Scripting

Finding Authors in Common Across Dozens of Lists

I currently have publication lists for ~3 dozen faculty members. I need to find out how many publications are in common across all faculty members - person 1 with person 2, person 1 with person 3, person 2 with person 3, person 1 with both person 2 and person 3, etc. One person may have Last1,... (5 Replies)
Discussion started by: Peggy White
5 Replies

5. Shell Programming and Scripting

finding common numbers (contents) across 2 or 3 files

I have 3 files which are tab delimited and have numbers in it. file 1 1 2 3 4 5 6 7 File 2 3 5 7 8 File 3 1 (4 Replies)
Discussion started by: Lucky Ali
4 Replies

6. Shell Programming and Scripting

Common records after matching on different columns

Hi, I have the following files. cat 1.txt cat 2.txt output.txt The logic is as follows.... (10 Replies)
Discussion started by: jacobs.smith
10 Replies

7. Shell Programming and Scripting

Two columns-Common records - 20 files

Hi Friends, I have an input file like this cat input1 x 1 y 2 z 3 a 2 b 4 c 6 d 9 cat input2 x 7 h 8 k 9 l 5 m 9 d 12 (5 Replies)
Discussion started by: jacobs.smith
5 Replies

8. Shell Programming and Scripting

Common values in 2 columns in 2 files

Hello, Suppose I have these 2 tab delimited files, where the second column in first file contains matching values from first column of the second file, I would like to get an output like this: File A 1 A 2 B 3 C File B A Apple C Cinnabon B Banana I would like... (1 Reply)
Discussion started by: Mohamed EL Hadi
1 Replies

9. Shell Programming and Scripting

Finding out the common lines in two files using 4 fields with the help of awk and UNIX

Dear All, I have 2 files. If field 1, 2, 4 and 5 matches in both file1 and file2, I want to print the whole line of file1 and file2 one after another in my output file. File1: sc2/80 20 . A T 86 F=5;U=4 sc2/60 55 . G T ... (1 Reply)
Discussion started by: NamS
1 Replies

10. Shell Programming and Scripting

Finding most common substrings

Hello, I would like to know what is the three most abundant substrings of length 6 from col2. The file is quite large and looks like this col1 col2 EN03 typehellobyedogcatcatdog EN09 typehellobyebyebyebye EN08 dogcatcatdogbyebyebyebye EN09 catcattypehellobyebyebyebye... (9 Replies)
Discussion started by: verse123
9 Replies
Ace::Sequence::Transcript(3pm)				User Contributed Perl Documentation			    Ace::Sequence::Transcript(3pm)

NAME
Ace::Sequence::Transcript - Simple "Gene" Object SYNOPSIS
# open database connection and get an Ace::Object sequence use Ace::Sequence; # get a megabase from the middle of chromosome I $seq = Ace::Sequence->new(-name => 'CHROMOSOME_I, -db => $db, -offset => 3_000_000, -length => 1_000_000); # get all the transcripts @genes = $seq->transcripts; # get the exons from the first one @exons = $genes[0]->exons; # get the introns @introns = $genes[0]->introns # get the CDSs (NOT IMPLEMENTED YET!) @cds = $genes[0]->cds; DESCRIPTION
Ace::Sequence::Gene is a subclass of Ace::Sequence::Feature. It inherits all the methods of Ace::Sequence::Feature, but adds the ability to retrieve the annotated introns and exons of the gene. OBJECT CREATION
You will not ordinarily create an Ace::Sequence::Gene object directly. Instead, objects will be created in response to a transcripts() call to an Ace::Sequence object. OBJECT METHODS
Most methods are inherited from Ace::Sequence::Feature. The following methods are also supported: exons() @exons = $gene->exons; Return a list of Ace::Sequence::Feature objects corresponding to annotated exons. introns() @introns = $gene->introns; Return a list of Ace::Sequence::Feature objects corresponding to annotated introns. cds() @cds = $gene->cds; Return a list of Ace::Sequence::Feature objects corresponding to coding sequence. THIS IS NOT YET IMPLEMENTED. relative() $relative = $gene->relative; $gene->relative(1); This turns on and off relative coordinates. By default, the exons and intron features will be returned in the coordinate system used by the gene. If relative() is set to a true value, then coordinates will be expressed as relative to the start of the gene. The first exon will (usually) be 1. SEE ALSO
Ace, Ace::Object, Ace::Sequence,Ace::Sequence::Homol, Ace::Sequence::Feature, Ace::Sequence::FeatureList, GFF AUTHOR
Lincoln Stein <lstein@cshl.org> with extensive help from Jean Thierry-Mieg <mieg@kaa.crbm.cnrs-mop.fr> Copyright (c) 1999, Lincoln D. Stein This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty. POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 168: You forgot a '=back' before '=head1' perl v5.14.2 2001-05-22 Ace::Sequence::Transcript(3pm)
All times are GMT -4. The time now is 03:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy