Sponsored Content
Top Forums Shell Programming and Scripting Tricky task with DNA sequences. Post 302551791 by radoulov on Wednesday 31st of August 2011 04:18:34 PM
Old 08-31-2011
If the answer is yes:

Code:
perl -nle'BEGIN {
  @map{ A, C, G, T } = ( T, G, C, A )
  }
  print /^>/ ?
    $_ :
      join //, map $map{ $_ }, split //, scalar reverse
  ' infile

This User Gave Thanks to radoulov For This Post:
 

9 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Tricky one...

Here's my problem: I have a laptop running Windows XP Pro with no internal CD or Floppy drives. I want to install Linux on it. I don't care about the Windows XP Pro installation, in fact I would like to install Linux over the entirety of the HD. However I cannot boot from any external CD drive... (1 Reply)
Discussion started by: saabir
1 Replies

2. Shell Programming and Scripting

Tricky Sed

Hello. I am trying to convert occurrences of 'NULL' from a datafile. The 'NULL' occurences appears at this: |NULL| NULL|NULL| NULL|NULL| NULL|NULL| NULL| There should be 52 fields per line. I would like any occurrence of | NULL| or |NULL| to appear as '||' Currently I am using this sed... (2 Replies)
Discussion started by: bestbuyernc
2 Replies

3. Shell Programming and Scripting

comment and Uncomment single task out of multiple task

I have a file contains TASK gsnmpproxy { CommandLine = $SMCHOME/bin/gsnmpProxy.exe } TASK gsnmpdbgui { CommandLine = $SMCHOME/bin/gsnmpdbgui.exe I would like to comment and than uncomment specific task eg TASK gsnmpproxy Pls suggest how to do in shell script (9 Replies)
Discussion started by: madhusmita
9 Replies

4. Shell Programming and Scripting

Parse an XML task list to create each task.xml file

I have an task definition listing xml file that contains a list of tasks such as <TASKLIST <TASK definition="Completion date" id="Taskname1" Some other <CODE name="Code12" <Parameter pname="Dog" input="5.6" units="feet" etc /Parameter> <Parameter... (3 Replies)
Discussion started by: MissI
3 Replies

5. Shell Programming and Scripting

Extracting DNA sequences from GenBank files using Perl

Hi all, Using Perl, I need to extract DNA bases from a GenBank file for a given plant species. A sample GenBank file is here... Nucleotide This is saved on my computer as NC_001666.gb. I also have a file that is saved on my computer as NC_001666.txt. This text file has a list of all... (5 Replies)
Discussion started by: akreibich07
5 Replies

6. Solaris

Tricky egrep

Hi folks! My first post here. I'm working on a script that retrieves a range of files from a list depending on a range of time. UPDATE: I've seen it could be difficult to read all this thing, so I'll make a summarize it.. How come I do this and take a result.. grep "..\:.." lista.new |... (4 Replies)
Discussion started by: kl0x
4 Replies

7. HP-UX

Tricky situation getting IP address

Hi, I have a multihomed system HP-UX with two NIC cards having IP address 10.9.0.13 & 10.9.0.45 I have two weblogic servers running one listening on "10.9.0.13" and the other on "10.9.0.45" Given a PID how is it possible to extract the IP Address that the weblogic server is using and... (1 Reply)
Discussion started by: mohtashims
1 Replies

8. Shell Programming and Scripting

Shell script for changing the accession number of DNA sequences in a FASTA file

Hi, I am having a file of dna sequences in fasta format which look like this: >admin_1_45 atatagcaga >admin_1_46 atatagcagaatatatat with many such thousands of sequences in a single file. I want to the replace the accession Id "admin_1_45" similarly in following sequences to... (5 Replies)
Discussion started by: margarita
5 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
LASTAL(1)							   User Commands							 LASTAL(1)

NAME
lastal - genome-scale comparison of biological sequences SYNOPSIS
lastal [options] lastdb-name fasta-sequence-file(s) DESCRIPTION
Find local sequence alignments. Score options (default settings): -r: match score (DNA: 1, protein: blosum62, 0<Q<5: 6) -q: mismatch cost (DNA: 1, protein: blosum62, 0<Q<5: 18) -p: file for residue pair scores -a: gap existence cost (DNA: 7, protein: 11, 0<Q<5: 21) -b: gap extension cost (DNA: 1, pro- tein: 2, 0<Q<5: 9) -c: unaligned residue pair cost (100000) -F: frameshift cost (off) -x: maximum score drop for gapped alignments (max[y, a+b*20]) -y: maximum score drop for gapless alignments (t*10) -z: maximum score drop for final gapped alignments (x) -d: minimum score for gapless alignments (e*3/5) -e: minimum score for gapped alignments (DNA: 40, protein: 100, 0<Q<5: 180) Cosmetic options (default settings): -h: show all options and their default settings -v: be verbose: write messages about what lastal is doing -o: output file -f: output format: 0=tabular, 1=maf (1) Miscellaneous options (default settings): -s: strand: 0=reverse, 1=forward, 2=both (2 for DNA, 1 for protein) -m: maximum multiplicity for initial matches (10) -l: minimum length for initial matches (1) -n: maximum number of gapless alignments per query position (infinity) -k: step-size along the query sequence (1) -i: query batch size (1 MiB if Q>0, else 16 MiB if j=0, else 128 MiB) -u: mask lowercase during extensions: 0=never, 1=gapless, 2=gapless+gapped but not final, 3=always (2 if lastdb -c and Q<5, else 0) -w: supress repeats inside exact matches, offset by this distance or less (1000) -G: genetic code file -t: 'temperature' for calculating probabilities (1/lambda) -g: 'gamma' parameter for gamma-centroid and LAMA (1) -j: output type: 0=match counts, 1=gapless, 2=redundant gapped, 3=gapped, 4=column ambiguity estimates, 5=gamma-centroid, 6=LAMA (3) -Q: input format: 0=fasta, 1=fastq-sanger, 2=fastq-solexa, 3=fastq-illumina, 4=prb, 5=PSSM (0) REPORTING BUGS
Report bugs to: last (ATmark) cbrc (dot) jp LAST home page: http://last.cbrc.jp/ lastal 199 May 2012 LASTAL(1)
All times are GMT -4. The time now is 02:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy