Sponsored Content
Top Forums Shell Programming and Scripting How to remove those sequence with same amino acid?What command line I should type? Post 302278432 by koti_rama on Tuesday 20th of January 2009 08:07:06 AM
Old 01-20-2009
try like this:
s1-> this contains you source date
out-> out put file


while read line
do
acid=`echo $line | awk ' FS=" " {print $1}'`
count=`grep $acid s1 | wc -l`
if [ "$count" -gt "1" ]; then
echo " Acid $acid exit in out file"
continue;
else
echo "$line" >>out.log
fi
done<s1

Last edited by koti_rama; 01-20-2009 at 09:16 AM..
 

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
chemeq(1)																 chemeq(1)

NAME
Chemeq - Chemical Equation Analyzer SYNOPSIS
chemeq [options] DESCRIPTION
Chemeq is a chemical equation analyzer. It is a fast lexical and syntaxic analyser which helps to find out chemical informations embedded in source chemical equations. Data can be output in various sophisticated formats, depending on options. 'chemeq' defaults to 'chemeq -mlcwCn'. OPTIONS
Options are active only if chemeq parses an equation of chemical reaction. If chemeq parses the formula of a simple chemical, no option is taken in account, the output is just a straightforward TeX string representing the simple chemical. -h Displays Help. -v Displays the Version number -M Outputs al list of space separated molecular weights. -m Outputs a Minimal output. It allows chemeq to be idempotent, i.e. the command 'chemeq | chemeq' is equivalent to 'chemeq'. -l Outputs a LaTeX string representing the chemical equation. -c Outputs a message giving informations about the Conservation of elements and charges in the equation. 'OK' means that both elements and electric charges are balanced. -w Outputs the LaTeX string representing the Gulder-Waage equation related to the input chemical equation, or the Nernst equation, if the input equation is a redox semi-equation. -C Outputs a detailed Count of the molecules and atoms contained in each member of the chemical equation. For example for the equation "H2_g + 1/2 O2_g --> H2O" it outputs: "H2_g|H:1*2, 1/2 O2_g|O:1/2*2; H2O|H:1*2 O:1*1" -e Outputs a detailed count of the Electrical charges. -s Outputs a list of the chemical Species. -n Outputs a Normalized string accounting for the input equation. Two chemical equations having the same normalized string are chemi- cally equivalent, even if the molecules are scrambled around and the coefficient are not equal but proportionnal. ENVIRONMENT VARIABLES
chemeq_input if set, this variables's value overrides the standard input. If this variable is not set, the variable w_chemeq_input is taken in account (useful for the WIMS server). chemeq_option if set, this variable's value overrides the options.If this variable is not set, the variable w_chemeq_option is taken in account (useful for the WIMS server). EXAMPLES
echo "1/2 Cu^2+ + OH- -> 1/2Cu(OH)2s" | chemeq will display informations about the reaction of hydroxyde and Cu II ions. echo "MnO4^- + 8H3O^+ + 5e- --> Mn^2+ + 12 H2O" | chemeq will display informations about the reaction of reduction of permanganate ions in an acid environment. echo "MnO4^- + 8H3O^+ + 5e- --> Mn^2+ + 12 H2O" | chemeq -w will display the LaTeX format for the Nernst law related to the reduction of permanganate ions in an acid environment. echo "MnO4^- + 8H3O^+ + 5e- --> Mn^2+ + 8 H2O" | chemeq -c will highlight the lack of conservation of elements H and O (water molecules are not well balanced). NOTE
: syntax of ions allthough in some cases, shorter expressions are sucessfully parsed, it is safer to consider that an "up arrow" (^) must be put before the charge symbols of an ion. Examples : H3O^+, Fe(CN)6^4-, OH^- Composing chemical equations. Two operators are defined, # as an additive oprator and ~ (tilde) as a substractive operator: they allow to compose several chemical equa- tions echo "MnO4^- + 8H3O^+ + 5e- --> Mn^2+ + 8 H2O ~ 5Fe^3+ + 5e- -> 5Fe^2+" | chemeq will display the pure redox equation from the first equation, minus the second one. Electrons are simplified. So it will be equiva- lent to: echo "MnO4^- + 8H3O^+ + 5Fe^2+--> Mn^2+ + 8 H2O + 5Fe^3+" | chemeq which is their combination. Mutiplying a chemical equation by one coefficient. The operator * permits to multiply a whole equation by one coefficient which may be a fraction. Here is an example: echo "5 * Fe^3+ + e- -> Fe^2+" | chemeq will be equivalent to echo "5Fe^3+ + 5e- -> 5Fe^2+" | chemeq Combining chemical equations, with coefficients. The two previous techniques can be used at the same time, which enables you to make more comlicated combinations, like this one: echo "Fe^3+ + e^- -> Fe^2+ (0.77 V) # Fe^2+ + 6CN^- -> Fe(CN)6^4- (Kfa=1e24) ~ Fe^3+ + 6CN^- -> Fe(CN)6^3- (Kfb=1e31)" | chemeq which will work as expected, and yeld a good value for the standard potential of the redox couple of hexacyanoferrate II and III ions. AUTHORS
Georges Khaznadar, <georgesk@ofset.org> KNOWN BUGS
When not specified, chemical entities coming from the standard input are believed to be in aqueous solutions. Water is considered by default as the main solvent. Only one liquid (aqueous) phase is currently taken in account. All solid chemical entities are considered as parts of separated phases. Suffixes _s, _g and _aq can be used to enforce the type of some chemical entities. There may be problemes when you write a standard potential with no decimal dot. For example, the entry Mn^2+ + 2e^- -> Mn_s (-1 V) would trigger an error. Then write Mn^2+ + 2e^- -> Mn_s (-1.0 V) or the more accurate value Mn^2+ + 2e^- -> Mn_s (-1.18 V) and there will be no error. 4 june 2000 chemeq(1)
All times are GMT -4. The time now is 04:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy