Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Removing rows that contain non-unique column entry Post 302924198 by msatseqs on Thursday 6th of November 2014 10:34:25 PM
Old 11-06-2014
Removing rows that contain non-unique column entry

Background:
I have a file of thousands of potential SSR primers from Batch Primer 3.
I can't use primers that will contain the same sequence ID or sequence as another primer.
I have some basic shell scripting skills, but not enough to handle this.

What you need to know:
I need to remove the entire line(row) if its entry in column 3 or 13 is not unique when compared to the rest of its column. Or, I need to cat all lines that have a unique entry in columns 3 and 13 to a new file.

Note: I can't just remove the duplicate value, I have to remove the whole row after checking a value in that row against the rest of its column.

Example data is attached. Red values are duplicates.

Thank you very very very much!
Removing rows that contain non-unique column entry-example-msat-datapng
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Removing the rest of line from the second entry of an expression

Dear people, can you please enlighten: I need to do a (most probably) very simple thing but couldn't figure how. I have files with lots of lines starting with a fixed expression: Query=. (the dot is a space) followed by different combinations of characters including special ones such... (5 Replies)
Discussion started by: roussine
5 Replies

2. Shell Programming and Scripting

for each different entry in column 1 extract maximum values from column 2 in unix/awk

Hello, I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2 SDF4 -0.211654 SDF4 0.978068 ... (1 Reply)
Discussion started by: Diya123
1 Replies

3. Shell Programming and Scripting

Rename a header column by adding another column entry to the header column name URGENT!!

Hi All, I have a file example.csv which looks like this GrpID,TargetID,Signal,Avg_Num CSCH74_1_1,2007,61,256 CSCH74_1_1,212007,647,679 CSCH74_1_1,12007,3,32 CSCH74_1_1,207,299,777 I want the output as GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num CSCH74_1_1,2007,61,256... (4 Replies)
Discussion started by: Vavad
4 Replies

4. Shell Programming and Scripting

unique entry add values

Hi, I have a file with 3 columns ABC 3 1 ABC 5 1 XYZ 4 2 DEF 3 2 DEF 4 1 DEF 6 1 MNO 5 5 JKL 3 2 JKL 4 2 PQR 12 1 For each unique entry in column 1 I want to add values in column 2 and column3 o/p ABC 8 2 XYZ 4 2 (1 Reply)
Discussion started by: Diya123
1 Replies

5. UNIX for Dummies Questions & Answers

Delete rows with unique value for specific column

Hi all I have a file which looks like this 1234|1|Jon|some text|some text 1234|2|Jon|some text|some text 3453|5|Jon|some text|some text 6533|2|Kate|some text|some text 4567|3|Chris|some text|some text 4567|4|Maggie|some text|some text 8764|6|Maggie|some text|some text My third column is my... (9 Replies)
Discussion started by: A-V
9 Replies

6. UNIX for Dummies Questions & Answers

merging rows into new file based on rows and first column

I have 2 files, file01= 7 columns, row unknown (but few) file02= 7 columns, row unknown (but many) now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there e.g. file 01 James|0|50|25|10|50|30... (1 Reply)
Discussion started by: A-V
1 Replies

7. Shell Programming and Scripting

Delete unique rows - optimize script

Hi all, I have the following input - the unique row key is 1st column cat file.txt A response C request C response D request C request C response E request The desired output should be C request (7 Replies)
Discussion started by: varu0612
7 Replies

8. Shell Programming and Scripting

Unique extraction of rows

I do have a tab delimited file of the following format: 431 kat1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 432 kat2 2 NA NA NA NA NA NA NA NA NA NA NA NA NA 433 KATe NA 3 NA NA 6 NA NA NA 10 11 NA NA NA NA 542 Kaed 2 NA NA NA NA NA NA NA NA NA NA NA NA NA 543 hkwuy NA NA NA NA 6 NA NA NA NA 11 NA NA... (11 Replies)
Discussion started by: Kanja
11 Replies

9. Shell Programming and Scripting

Count occurrence of column one unique value having unique second column value

Hello Team, I need your help on the following: My input file a.txt is as below: 3330690|373846|108471 3330690|373846|108471 0640829|459725|100001 0640829|459725|100001 3330690|373847|108471 Here row 1 and row 2 of column 1 are identical but corresponding column 2 value are... (4 Replies)
Discussion started by: angshuman
4 Replies

10. UNIX for Beginners Questions & Answers

Awk/sed summation of one column based on some entry in first column

Hi All , I am having an input file as stated below Input file 6 ddk/djhdj/djhdj/Q 10 0.5 dhd/jdjd.djd.nd/QB 01 0.5 hdhd/jd/jd/jdj/Q 10 0.5 512 hd/hdh/gdh/Q 01 0.5 jdjd/jd/ud/j/QB 10 0.5 HD/jsj/djd/Q 01 0.5 71 hdh/jjd/dj/jd/Q 10 0.5 ... (5 Replies)
Discussion started by: kshitij
5 Replies
Bio::PrimerDesigner::epcr(3pm)				User Contributed Perl Documentation			    Bio::PrimerDesigner::epcr(3pm)

NAME
Bio::PrimerDesigner::epcr - A class for accessing the epcr binary SYNOPSIS
use Bio::PrimerDesigner::epcr; DESCRIPTION
A low-level interface to the e-PCR binary. Uses supplied PCR primers, DNA sequence and stringency parameters to predict both expected and unexpected PCR products. METHODS
run Sets up the e-PCR request for a single primer combination and returns an Bio::PrimerDesigner::Result object If the permute flag is true, all three possible primer combinations will be tested (ie: forward + reverse, forward + forward, reverse + reverse) request Assembles the e-PCR config file and command-line arguments and send the e-PCR request to the local e-PCR binary or remote server. verify Check to make that the e-PCR binary is installed and functioning properly. Since e-PCR returns nothing if no PCR product is found in the sequence, we have to be able to distinguish between a valid, undefined output from a functioning e-PCR and an undefined output for some other reason. verify uses sham e-PCR data that is known to produce a PCR product. binary_name Defines the binary's name on the system. list_aliases There are no aliases to list for epcr. list_params Returns a list of e-PCR configuration options. Required e-PCR input is a sequence string or file and the left and right primers. Default values will be used for the remaining options if none are supplied. AUTHOR
Copyright (C) 2003-2009 Sheldon McKay <mckays@cshl.edu>, Ken Youens-Clark <kclark@cpan.org>. LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. SEE ALSO
Bio::PrimerDesigner::primer3. perl v5.10.0 2009-08-04 Bio::PrimerDesigner::epcr(3pm)
All times are GMT -4. The time now is 01:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy