Skip to content

Commit

Permalink
added 'amplify' script; roughly defines an amplicon
Browse files Browse the repository at this point in the history
  • Loading branch information
greg committed Jun 1, 2011
1 parent 6d06e8a commit 7030d2f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .bzrignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ fastahead
fastalint
fastatail
fastacomplement
fastastack
22 changes: 22 additions & 0 deletions amplify
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
#
# Usage: amplify <template.fasta> <left-primer.fasta> <right-primer.fasta>
#
# Cuts out the portion of 'template.fasta' _roughly_ matching the region
# amplified by left-primer and right-primer.
#
# To get the exact amplicon -- use your editor! Sorry!
#

PREFIX=`dirname $0`;
TEMPLATE=$1;
LEFT_PRIMER=$2;
RIGHT_PRIMER=$3;

start=`cat $LEFT_PRIMER $TEMPLATE | kalign -e100 2>/dev/null | ${PREFIX}/fastagap`;

end=`(cat $RIGHT_PRIMER | ${PREFIX}/fastacomplement; cat $TEMPLATE) | kalign -e100 2>/dev/null | ${PREFIX}/fastagap`;

cat $TEMPLATE | ${PREFIX}/fastahead $end | ${PREFIX}/fastatail $start | ${PREFIX}/fastalint;


0 comments on commit 7030d2f

Please sign in to comment.