File: single-read-mapping.sh

package info (click to toggle)
genometools 1.6.1%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 50,412 kB
  • sloc: ansic: 271,241; ruby: 30,339; python: 4,880; sh: 3,193; makefile: 1,194; perl: 219; pascal: 159; haskell: 37; sed: 5
file content (30 lines) | stat: -rwxr-xr-x 1,061 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

set -e -x

if test $# -ne 4
then
  echo "Usage: $0 <numreads> <inputfile> <mincoverage> <seedlength>"
  exit 1
fi
numreads=$1
inputfile=$2
mincoverage=$3
seedlength=$4
readlength=150
maxfreq=14
minidentity=95
readset=reads-${numreads}-ill-def.fa
scripts/simulate-reads.rb -n $numreads -l ${readlength} -i ${inputfile}

env -i bin/gt encseq encode -indexname query-idx ${readset}
env -i bin/gt encseq encode -indexname reference-idx ${inputfile}
minlength=`expr ${readlength} \* ${mincoverage}`
minlength=`expr ${minlength} \/ 100`
common="-v -ii reference-idx -qii query-idx --no-reverse -outfmt fstperquery -l ${minlength} -minidentity ${minidentity} -seedlength ${seedlength}"
env -i bin/gt seed_extend ${common} > tmp.matches
scripts/collect-mappings.rb ${readset} tmp.matches
env -i bin/gt seed_extend ${common} -maxmat 2 > tmp-maxmat.matches
scripts/collect-mappings.rb ${readset} tmp-maxmat.matches
env -i bin/gt seed_extend ${common} -maxmat 2 -use-apos > tmp-maxmat-apos.matches
scripts/collect-mappings.rb ${readset} tmp-maxmat-apos.matches