Mercurial > repos > davidvanzessen > shm_csr
diff baseline/wrapper.sh @ 63:8728284105ee draft
Uploaded
author | davidvanzessen |
---|---|
date | Wed, 06 Dec 2017 08:04:52 -0500 |
parents | c33d93683a09 |
children |
line wrap: on
line diff
--- a/baseline/wrapper.sh Tue Dec 05 10:57:13 2017 -0500 +++ b/baseline/wrapper.sh Wed Dec 06 08:04:52 2017 -0500 @@ -41,7 +41,7 @@ do f=$(file $current) zipType="Zip archive" - if [[ "$f" == *"$zipType"* ]] || [[ "$f" == *"XZ compressed data"* ]] + if [[ "$f" == *"Zip archive"* ]] || [[ "$f" == *"XZ compressed data"* ]] then id=${IDs[$count]} echo "id=$id" @@ -55,19 +55,13 @@ mkdir -p "$PWD/$id/files" tar -xJf $current -C "$PWD/$id/files/" fi - summaryfile="$PWD/summary_${id}.txt" - gappedfile="$PWD/gappednt_${id}.txt" filtered="$PWD/filtered_${id}.txt" - filecount=`ls -l $PWD/$id/ | wc -l` - if [[ "$filecount" -eq "2" ]] - then - cat $PWD/$id/*/1_* > $summaryfile - cat $PWD/$id/*/2_* > $gappedfile - else - cat $PWD/$id/1_* > $summaryfile - cat $PWD/$id/2_* > $gappedfile - fi - Rscript $dir/filter.r $summaryfile $gappedfile "$selection" $filtered 2>&1 + imgt_1_file="`find $PWD/$id -name '1_*.txt'`" + imgt_2_file="`find $PWD/$id -name '2_*.txt'`" + echo "1_Summary file: ${imgt_1_file}" + echo "2_IMGT-gapped file: ${imgt_2_file}" + echo "filter.r for $id" + Rscript $dir/filter.r ${imgt_1_file} ${imgt_2_file} "$selection" $filtered 2>&1 final="$PWD/final_${id}.txt" cat $filtered | cut -f2,4,7 > $final @@ -77,12 +71,6 @@ fi count=$((count+1)) done - -if [[ $(wc -l < $fasta) -eq "1" ]]; then - echo "No sequences in the fasta file, exiting" - exit 0 -fi - workdir="$PWD" cd $dir echo "file: ${inputs[0]}"