Sponsored Content
Top Forums Shell Programming and Scripting How to remove those sequence with same amino acid?What command line I should type? Post 302278430 by Franklin52 on Tuesday 20th of January 2009 08:01:35 AM
Old 01-20-2009
Try this:

Code:
awk 'NR==FNR{a[$1]++;next}a[$1]==1' file file

Regards
 

10 More Discussions You Might Find Interesting

1. Solaris

How to remove user from a group using command line

Hi, Wanted to remove a user from a group , but no GUI , must use command line (2 Replies)
Discussion started by: civic2005
2 Replies

2. Programming

Need help in storing command line argument argv[2] to a variable of int type

The following program takes two command line arguments. I want the second argument (fileCount) to be stored/printed as a int value. I tried my best to typecast the char to int (check the printf statement at last) but is not working...the output is some junk value. This program is in its... (3 Replies)
Discussion started by: frozensmilz
3 Replies

3. Shell Programming and Scripting

How can I calculate the total of nucleotide in Unix?What command line I should type?

For example, if I have the file whose content are: >HWI-EAS382_30FC7AAXX:7:1:927:1368 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA >HWI-EAS382_30FC7AAXX:7:1:924:1373 ACGAACTTTAAAGCACCTCTTGGCTCGTATGCCGTC I want my output calculate the total of nucleotide. So my output should look like this:... (2 Replies)
Discussion started by: patrick chia
2 Replies

4. Shell Programming and Scripting

How can I remove those duplicate sequence in UNIX?What command line I should type?

The input is: >HWI-EAS382_30FC7AAXX:4:1:1580:1465 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA >HWI-EAS382_30FC7AAXX:4:1:1062:1640 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA >HWI-EAS382_30FC7AAXX:4:1:272:629 AAAAAAAAGCTATAGTCTCGTCACACATACTCACAA >HWI-EAS382_30FC7AAXX:4:1:1033:1135... (4 Replies)
Discussion started by: patrick chia
4 Replies

5. UNIX for Dummies Questions & Answers

Command to remove First and Last line from a File

I have a file from which the Header and the Trailer lines need to be removed. They are confirmed to be the first and the last lines in the file. I have tried a few commands, but not successful yet. It needs to be implemented urgently, hence any help is greatly appreciated. Raghu ----------... (1 Reply)
Discussion started by: ragz_82
1 Replies

6. Shell Programming and Scripting

Remove Command-Line Option from String

I want to add a "-r <remote_host>" option to my ksh script, causing the script to run a script of the same name on the specified remote host. The remote invocation should itself include all the command-line options of the original invocation, less the -r option. For example, this invocation: ... (7 Replies)
Discussion started by: mattmiller
7 Replies

7. Shell Programming and Scripting

How to remove unwanted elements from the command line?

CREATE TYPE "SUPERB"."OE_L2_FOOTERDATA_REC" OID '1232323232' IS OBJECT ( AWLSTrxId NUMBER, AdjPurchaseAmount NUMBER, Network NUMBER, ConfigVersion NUMBER ); / I wanted my output to be as follow: CREATE TYPE OE_L2_FOOTERDATA_REC OID '1232323232'... (7 Replies)
Discussion started by: jediwannabe
7 Replies

8. AIX

Finding the type of AIX server using command line

Hi All, I am trying to find out type of AIX servers , for eg : server A is eServer p5 520 , server B is pSeries 630-6C4 etc. Can some one suggest me the best way to retrive this information through command line. is there any direct command or script by which i can retrieve this information... (9 Replies)
Discussion started by: omkar.jadhav
9 Replies

9. Shell Programming and Scripting

Convert a DNA sequence into Amino Acid

I am trying to write a bash script that would be able to read DNA sequences (each line in the file is a sequence) from a file, where sequences are separated by an empty line. I am then to find the amino acid that these DNA sequences encode per codon (each group of three literals.) For example, if I... (3 Replies)
Discussion started by: faizlo
3 Replies

10. UNIX for Beginners Questions & Answers

Need a command to remove the last word in the first line of a file

I have a eg file op.txt This is a cat This is a fat cat This is a fat black cat I want to remove only the word cat from the first alone .can somebody help. please do wrap your samples in CODE TAGS As per forum rules. (7 Replies)
Discussion started by: Sharks
7 Replies
Bio::Tools::OddCodes(3pm)				User Contributed Perl Documentation				 Bio::Tools::OddCodes(3pm)

NAME
Bio::Tools::OddCodes - Object holding alternative alphabet coding for one protein sequence SYNOPSIS
# Take a sequence object from eg, an inputstream, and creates an # object for the purposes of rewriting that sequence in another # alphabet. These are abbreviated amino acid sequence alphabets, # designed to simplify the statistical aspects of analysing protein # sequences, by reducing the combinatorial explosion of the # 20-letter alphabet. These abbreviated alphabets range in size # from 2 to 8. # Creating the OddCodes object, eg: my $inputstream = Bio::SeqIO->new( '-file' => "seqfile", '-format' => 'Fasta'); my $seqobj = $inputstream->next_seq(); my $oddcode_obj = Bio::Tools::Oddcodes->new(-seq => $seqobj); # or: my $seqobj = Bio::PrimarySeq->new (-seq=>'[cut and paste a sequence here]', -alphabet => 'protein', -id => 'test'); my $oddcode_obj = Bio::Tools::OddCodes->new(-seq => $seqobj); # do the alternative coding, returning the answer as a reference to # a string my $output = $oddcode_obj->structural(); my $output = $oddcode_obj->chemical(); my $output = $oddcode_obj->functional(); my $output = $oddcode_obj->charge(); my $output = $oddcode_obj->hydrophobic(); my $output = $oddcode_obj->Dayhoff(); my $output = $oddcode_obj->Sneath(); my $output = $oddcode_obj->Stanfel(); # display sequence in new form, eg: my $new_coding = $$output; print " $new_coding"; DESCRIPTION
Bio::Tools::Oddcodes is a welterweight object for rewriting a protein sequence in an alternative alphabet. Eight of these are provided, ranging from the the 2-letter hydrophobic alphabet, to the 8-letter chemical alphabet. These are useful for the statistical analysis of protein sequences since they can partially avoid the combinatorial explosion produced by the full 20-letter alphabet (eg. 400 dimers, 8000 trimers etc.) The objects will print out a warning if the input sequence is not a protein. If you know what you are doing, you can silence the warning by setting verbose() to a negative value. See SYNOPSIS above for object creation code. REFERENCES
Stanfel LE(1996) A new approach to clustering the amino acids. J. theor. Biol. 183, 195-205. Karlin S, Ost F and Blaisdell BE(1989) Patterns in DNA and amino acid sequences and their statistical significance. Chapter 6 of: Mathematical Methods for DNA Sequences. Waterman MS (ed.) CRC Press, Boca Raton , FL. FEEDBACK
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Support Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: https://redmine.open-bio.org/projects/bioperl/ AUTHOR
Derek Gatherer APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ structural Title : structural Usage : $output = $oddcode_obj->structural(); Function: turns amino acid sequence into 3-letter structural alphabet : A (ambivalent), E (external), I (internal) Example : a sequence ACDEFGH will become AAEEIAE Returns : Reference to the new sequence string Args : none functional Title : functional Usage : $output = $oddcode_obj->functional(); Function: turns amino acid sequence into 4-letter functional alphabet : A (acidic), C (basic), H (hydrophobic), P (polar) Example : a sequence ACDEFGH will become HPAAHHC Returns : Reference to the new sequence string Args : none hydrophobic Title : hydrophobic Usage : $output = $oddcode_obj->hydrophobic(); Function: turns amino acid sequence into 2-letter hydrophobicity alphabet : O (hydrophobic), I (hydrophilic) Example : a sequence ACDEFGH will become OIIIOII Returns : Reference to the new sequence string Args : none Dayhoff Title : Dayhoff Usage : $output = $oddcode_obj->Dayhoff(); Function: turns amino acid sequence into 6-letter Dayhoff alphabet Example : a sequence ACDEFGH will become CADDGCE : A (=C), C (=AGPST), D (=DENQ), : E (=HKR), F (=ILMV), G (=FWY) Returns : Reference to the new sequence string Args : none Sneath Title : Sneath Usage : $output = $oddcode_obj->Sneath(); Function: turns amino acid sequence into 7-letter Sneath alphabet Example : a sequence ACDEFGH will become CEFFHCF : A (=ILV), C (=AGP), D (=MNQ), E (=CST), : F (=DE), G (=KR), H (=FHWY) Returns : Reference to the new sequence string Args : none Stanfel Title : Stanfel Usage : $output = $oddcode_obj->Stanfel(); Function: turns amino acid sequence into 4-letter Stanfel alphabet Example : a sequence ACDEFGH will become AACCDAE : A (=ACGILMPSTV), C (=DENQ), D (=FWY), E (=HKR) Returns : Reference to the new sequence string Args : none chemical Title : chemical Usage : $output = $oddcode_obj->chemical(); Function: turns amino acid sequence into 8-letter chemical alphabet : A (acidic), L (aliphatic), M (amide), R (aromatic) : C (basic), H (hydroxyl), I (imino), S (sulphur) Example : a sequence ACDEFGH will become LSAARAC Returns : Reference to the new sequence string Args : none charge Title : charge Usage : $output = $oddcode_obj->charge(); Function: turns amino acid sequence into 3-letter charge alphabet Example : a sequence ACDEFGH will become NNAANNC : A (negative; NOT anode), C (positive; NOT cathode), N (neutral) Returns : Reference to the new sequence string Args : none perl v5.14.2 2012-03-02 Bio::Tools::OddCodes(3pm)
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy