annotate 01_RemoveSNPs/RemoveSNPs @ 0:12f2a7545ff2 draft

Uploaded
author dktanwar
date Mon, 16 Oct 2017 13:59:28 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
1 #!/bin/bash
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
2
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
3 #if [ "$1" == "-h" ]; then
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
4 if [[ -z $1 || -z $2 || $1 == "-h" ]]; then
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
5 echo "This program will remove mismatches from sam file."
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
6 echo "Usage: `basename $0` test.sam 3"
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
7 exit 0
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
8 fi
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
9
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
10 cmd="echo perl -ne 'print if((/XM:i:[0-$2][^0-9]/) || (/^@/));' $1"
12f2a7545ff2 Uploaded
dktanwar
parents:
diff changeset
11 eval `$cmd`