This is an automated email from the git hooks/post-receive script. tille pushed a commit to branch master in repository seqsero.
commit 29a8a61bde4e29f2d148dd2b0aece632f72cd9ce Author: Andreas Tille <[email protected]> Date: Tue Apr 4 09:20:06 2017 +0200 Add script to anable batch processing easily --- debian/bin/seqsero_batch | 41 +++++++++++++++++++++++++++++++++++++++++ debian/install | 1 + 2 files changed, 42 insertions(+) diff --git a/debian/bin/seqsero_batch b/debian/bin/seqsero_batch new file mode 100755 index 0000000..eb82828 --- /dev/null +++ b/debian/bin/seqsero_batch @@ -0,0 +1,41 @@ +#!/bin/sh + +if [ $# != 1 ] ; then + echo "Usage: `basename $0` <dir_with_sequence_pairs>" + exit +fi + +if [ ! -d $1 ] ; then + echo "$1 needs to be a directory" + exit +fi + +numR1=`ls $1/*_R1_001.fastq.gz 2>/dev/null | wc -l` +if [ $numR1 -eq 0 ] ; then + echo "No sequences found in directory $1" + exit +fi + +numR2=`ls $1/*_R2_001.fastq.gz | wc -l` +if [ $numR1 -ne $numR2 ] ; then + cat <<EOT +Warning: suspicious number of sequences R1=$numR1 and R2=$numR2 +Both values should be equal. Please check that are data are valid. +Continuing processing anyway trying to find matching pairs. +EOT +fi + +cd $1 +for seq1 in `ls *_R1_001.fastq.gz` ; do + seq2=`echo $seq1 | sed 's/_R1_001\.fastq\.gz$/_R2_001.fastq.gz/'` + if [ ! -e "$seq2" ] ; then + echo "No matching sequence found for $seq1. File $seq2 does not exist." + else + check_old_results=`grep "^Input files:[[:space:]]\+\+$seq1 $seq2$" SeqSero_result*/Seqsero_result.txt` + if [ "$check_old_results" != "" ] ; then + echo "Calculation for $seq1 was done previously and can be found in `echo $check_old_results | sed 's/:Input files.*//'`" + else + seqsero -m 2 -i "$seq1" "$seq2" + fi + fi +done diff --git a/debian/install b/debian/install index 775db38..3569847 100644 --- a/debian/install +++ b/debian/install @@ -2,3 +2,4 @@ database usr/share/seqsero libs usr/share/seqsero primers usr/share/seqsero SeqSero.py usr/share/seqsero +debian/bin usr -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/seqsero.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
