Mercurial > repos > davidvanzessen > shm_csr
comparison wrapper.sh @ 57:cb779a45537b draft
Uploaded
author | davidvanzessen |
---|---|
date | Tue, 18 Jul 2017 04:28:11 -0400 |
parents | ee807645b224 |
children | 7b9481fa4a70 |
comparison
equal
deleted
inserted
replaced
56:ee807645b224 | 57:cb779a45537b |
---|---|
46 echo "Unrecognized format $type" > $log | 46 echo "Unrecognized format $type" > $log |
47 exit 1 | 47 exit 1 |
48 fi | 48 fi |
49 | 49 |
50 cat "`find $PWD/files/ -name "1_*"`" > $PWD/summary.txt | 50 cat "`find $PWD/files/ -name "1_*"`" > $PWD/summary.txt |
51 cat "`find $PWD/files/ -name "2_*"`" > $PWD/gapped_nt.txt | |
51 cat "`find $PWD/files/ -name "3_*"`" > $PWD/sequences.txt | 52 cat "`find $PWD/files/ -name "3_*"`" > $PWD/sequences.txt |
52 cat "`find $PWD/files/ -name "4_*"`" > $PWD/gapped_aa.txt | 53 cat "`find $PWD/files/ -name "4_*"`" > $PWD/gapped_aa.txt |
53 cat "`find $PWD/files/ -name "5_*"`" > $PWD/aa.txt | 54 cat "`find $PWD/files/ -name "5_*"`" > $PWD/aa.txt |
54 cat "`find $PWD/files/ -name "6_*"`" > $PWD/junction.txt | 55 cat "`find $PWD/files/ -name "6_*"`" > $PWD/junction.txt |
55 cat "`find $PWD/files/ -name "7_*"`" > $PWD/mutationanalysis.txt | 56 cat "`find $PWD/files/ -name "7_*"`" > $PWD/mutationanalysis.txt |
56 cat "`find $PWD/files/ -name "8_*"`" > $PWD/mutationstats.txt | 57 cat "`find $PWD/files/ -name "8_*"`" > $PWD/mutationstats.txt |
58 cat "`find $PWD/files/ -name "9_*"`" > $PWD/aa_change_stats.txt | |
57 cat "`find $PWD/files/ -name "10_*"`" > $PWD/hotspots.txt | 59 cat "`find $PWD/files/ -name "10_*"`" > $PWD/hotspots.txt |
58 | 60 |
59 echo "---------------- unique id check ----------------" | 61 echo "---------------- unique id check ----------------" |
60 | 62 |
61 Rscript $dir/check_unique_id.r $PWD/summary.txt $PWD/sequences.txt $PWD/gapped_aa.txt $PWD/aa.txt $PWD/junction.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt | 63 Rscript $dir/check_unique_id.r $PWD/summary.txt $PWD/gapped_nt.txt $PWD/sequences.txt $PWD/gapped_aa.txt $PWD/aa.txt $PWD/junction.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/aa_change_stats.txt $PWD/hotspots.txt |
62 | 64 |
63 if [[ ${#BLASTN_DIR} -ge 5 ]] ; then | 65 if [[ ${#BLASTN_DIR} -ge 5 ]] ; then |
64 echo "On server, using BLASTN_DIR env: ${BLASTN_DIR}" | 66 echo "On server, using BLASTN_DIR env: ${BLASTN_DIR}" |
65 else | 67 else |
66 BLASTN_DIR="/home/galaxy/Downloads/ncbi-blast-2.4.0+/bin" | 68 BLASTN_DIR="/home/galaxy/Downloads/ncbi-blast-2.4.0+/bin" |
75 echo "---------------- merge_and_filter.r ----------------" | 77 echo "---------------- merge_and_filter.r ----------------" |
76 echo "---------------- merge_and_filter.r ----------------<br />" >> $log | 78 echo "---------------- merge_and_filter.r ----------------<br />" >> $log |
77 | 79 |
78 Rscript $dir/merge_and_filter.r $PWD/summary.txt $PWD/sequences.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt "$PWD/gapped_aa.txt" $outdir/identified_genes.txt $outdir/merged.txt $outdir/before_unique_filter.txt $outdir/unmatched.txt $method $functionality $unique ${filter_unique} ${filter_unique_count} ${class_filter} ${empty_region_filter} 2>&1 | 80 Rscript $dir/merge_and_filter.r $PWD/summary.txt $PWD/sequences.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt "$PWD/gapped_aa.txt" $outdir/identified_genes.txt $outdir/merged.txt $outdir/before_unique_filter.txt $outdir/unmatched.txt $method $functionality $unique ${filter_unique} ${filter_unique_count} ${class_filter} ${empty_region_filter} 2>&1 |
79 | 81 |
80 if [[ "${naive_output}" == "yes" ]] ; then | 82 if [[ "${naive_output}" == "yes" ]] || [[ "$fast" == "no" ]] ; then |
81 | 83 |
82 echo "---------------- creating new IMGT zips ----------------" | 84 echo "---------------- creating new IMGT zips ----------------" |
83 echo "---------------- creating new IMGT zips ----------------<br />" >> $log | 85 echo "---------------- creating new IMGT zips ----------------<br />" >> $log |
84 | 86 |
85 mkdir $outdir/new_IMGT | 87 mkdir $outdir/new_IMGT |
86 | 88 |
87 cat "`find $PWD/files/ -name "1_*"`" > "$outdir/new_IMGT/1_Summary.txt" | 89 cp $PWD/summary.txt "$outdir/new_IMGT/1_Summary.txt" |
88 cat "`find $PWD/files/ -name "2_*"`" > "$outdir/new_IMGT/2_IMGT-gapped-nt-sequences.txt" | 90 cp $PWD/gapped_nt.txt "$outdir/new_IMGT/2_IMGT-gapped-nt-sequences.txt" |
89 cat "`find $PWD/files/ -name "3_*"`" > "$outdir/new_IMGT/3_Nt-sequences.txt" | 91 cp $PWD/sequences.txt "$outdir/new_IMGT/3_Nt-sequences.txt" |
90 cat "`find $PWD/files/ -name "4_*"`" > "$outdir/new_IMGT/4_IMGT-gapped-AA-sequences.txt" | 92 cp $PWD/gapped_aa.txt "$outdir/new_IMGT/4_IMGT-gapped-AA-sequences.txt" |
91 cat "`find $PWD/files/ -name "5_*"`" > "$outdir/new_IMGT/5_AA-sequences.txt" | 93 cp $PWD/aa.txt "$outdir/new_IMGT/5_AA-sequences.txt" |
92 cat "`find $PWD/files/ -name "6_*"`" > "$outdir/new_IMGT/6_Junction.txt" | 94 cp $PWD/junction.txt "$outdir/new_IMGT/6_Junction.txt" |
93 cat "`find $PWD/files/ -name "7_*"`" > "$outdir/new_IMGT/7_V-REGION-mutation-and-AA-change-table.txt" | 95 cp $PWD/mutationanalysis.txt "$outdir/new_IMGT/7_V-REGION-mutation-and-AA-change-table.txt" |
94 cat "`find $PWD/files/ -name "8_*"`" > "$outdir/new_IMGT/8_V-REGION-nt-mutation-statistics.txt" | 96 cp $PWD/mutationstats.txt "$outdir/new_IMGT/8_V-REGION-nt-mutation-statistics.txt" |
95 cat "`find $PWD/files/ -name "9_*"`" > "$outdir/new_IMGT/9_V-REGION-AA-change-statistics.txt" | 97 cp $PWD/aa_change_stats.txt "$outdir/new_IMGT/9_V-REGION-AA-change-statistics.txt" |
96 cat "`find $PWD/files/ -name "10_*"`" > "$outdir/new_IMGT/10_V-REGION-mutation-hotspots.txt" | 98 cp $PWD/hotspots.txt "$outdir/new_IMGT/10_V-REGION-mutation-hotspots.txt" |
97 | 99 |
98 mkdir $outdir/new_IMGT_IGA | 100 mkdir $outdir/new_IMGT_IGA |
99 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGA | 101 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGA |
100 | 102 |
101 mkdir $outdir/new_IMGT_IGA1 | 103 mkdir $outdir/new_IMGT_IGA1 |