-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from statbiophys/scripts
Temporal bash script to calculate pgen value of a given sequence.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
args=("$@") | ||
species=${args[0]} #human | ||
chain=${args[1]} #beta | ||
seque=${args[2]} | ||
export tmp_dir=$(mktemp -d) | ||
export tmp_seqfile=$(mktemp ${tmp_dir}/igorSeq.XXXXXXXXXXXXXXXXXXXXXX.txt) | ||
echo ${seque} > ${tmp_seqfile} | ||
export randomBatch=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c10` | ||
echo ${species}" "${chain}" "${tmp_dir}" "${tmp_seqfile} | ||
igor -set_wd ${tmp_dir} -batch ${randomBatch} -read_seqs ${tmp_seqfile} | ||
igor -set_wd ${tmp_dir} -batch ${randomBatch} -species ${species} -chain ${chain} -align --all | ||
igor -set_wd ${tmp_dir} -batch ${randomBatch} -species ${species} -chain ${chain} -evaluate -output --Pgen | ||
#cat ${tmp_dir}/aligns/${randomBatch}_indexed_sequences.csv | ||
#cat ${tmp_dir}/aligns/${randomBatch}_indexed_CDR3.csv | ||
pgenFile=${tmp_dir}/${randomBatch}_output/Pgen_counts.csv | ||
#cat ${pgenFile} | ||
pgenValue=`awk -F ';' 'FNR==2{print $2}' ${pgenFile}` | ||
echo ${pgenValue} | ||
rm -r ${tmp_dir} | ||
|