Mercurial > repos > davidvanzessen > change_o
diff parsedb.sh @ 6:3ddd933dd7a2 draft default tip
Uploaded
author | davidvanzessen |
---|---|
date | Thu, 15 Sep 2016 03:54:33 -0400 |
parents | dda9b2e72e2b |
children |
line wrap: on
line diff
--- a/parsedb.sh Mon Aug 15 10:06:24 2016 -0400 +++ b/parsedb.sh Thu Sep 15 03:54:33 2016 -0400 @@ -12,21 +12,21 @@ mkdir $PWD/outdir if [ "fasta" == "$action" ] ; then - /data/users/david/anaconda3/bin/python $dir/ParseDb.py fasta -d $input --outdir $PWD/outdir --outname output + python3 $dir/ParseDb.py fasta -d $input --outdir $PWD/outdir --outname output mv $PWD/outdir/output_sequences.fasta $output elif [ "clip" == "$action" ] ; then - /data/users/david/anaconda3/bin/python $dir/ParseDb.py clip -d $input --outdir $PWD/outdir --outname output + python3 $dir/ParseDb.py clip -d $input --outdir $PWD/outdir --outname output mv $PWD/outdir/output_sequences.fasta $output elif [ "split" == "$action" ] ; then field="`cat $input 2> /dev/null | head -n 1 | cut -f$4 | tr '\n\r' ' '`" label=$5 mkdir $PWD/split - /data/users/david/anaconda3/bin/python $dir/ParseDb.py split -d $input --outdir $PWD/split --outname output -f $field + python3 $dir/ParseDb.py split -d $input --outdir $PWD/split --outname output -f $field #rename "s/output_${field}/$label/" $PWD/split/* elif [ "add" == "$action" ] ; then field="`cat $input 2> /dev/null | head -n 1 | cut -f$4 | tr '\n\r' ' '`" value=$5 - /data/users/david/anaconda3/bin/python $dir/ParseDb.py add -d $input --outdir $PWD/outdir --outname output -f $field -u $value + python3 $dir/ParseDb.py add -d $input --outdir $PWD/outdir --outname output -f $field -u $value mv $PWD/outdir/output_parse-add.tab $output elif [ "delete" == "$action" ] ; then field="`cat $input 2> /dev/null | head -n 1 | cut -f$4 | tr '\n\r' ' '`" @@ -37,20 +37,20 @@ else regex="" fi - /data/users/david/anaconda3/bin/python $dir/ParseDb.py delete -d $input --outdir $PWD/outdir --outname output -f $field -u $value --logic any $regex + python3 $dir/ParseDb.py delete -d $input --outdir $PWD/outdir --outname output -f $field -u $value --logic any $regex mv $PWD/outdir/output_parse-delete.tab $output elif [ "drop" == "$action" ] ; then field="`cat $input 2> /dev/null | head -n 1 | cut -f$4 | tr '\n\r' ' '`" - /data/users/david/anaconda3/bin/python $dir/ParseDb.py drop -d $input --outdir $PWD/outdir --outname output -f $field + python3 $dir/ParseDb.py drop -d $input --outdir $PWD/outdir --outname output -f $field mv $PWD/outdir/output_parse-drop.tab $output elif [ "index" == "$action" ] ; then field=$4 - /data/users/david/anaconda3/bin/python $dir/ParseDb.py index -d $input --outdir $PWD/outdir --outname output -f $field + python3 $dir/ParseDb.py index -d $input --outdir $PWD/outdir --outname output -f $field mv $PWD/outdir/output_parse-index.tab $output elif [ "rename" == "$action" ] ; then field="`cat $input 2> /dev/null | head -n 1 | cut -f$4 | tr '\n\r' ' '`" newname=$5 - /data/users/david/anaconda3/bin/python $dir/ParseDb.py rename -d $input --outdir $PWD/outdir --outname output -f $field -k $newname + python3 $dir/ParseDb.py rename -d $input --outdir $PWD/outdir --outname output -f $field -k $newname mv $PWD/outdir/output_parse-rename.tab $output elif [ "select" == "$action" ] ; then field="`cat $input 2> /dev/null | head -n 1 | cut -f$4 | tr '\n\r' ' '`" @@ -61,7 +61,7 @@ else regex="" fi - /data/users/david/anaconda3/bin/python $dir/ParseDb.py select -d $input --outdir $PWD/outdir --outname output -f $field -u $value --logic any $regex + python3 $dir/ParseDb.py select -d $input --outdir $PWD/outdir --outname output -f $field -u $value --logic any $regex mv $PWD/outdir/output_parse-select.tab $output elif [ "sort" == "$action" ] ; then field="`cat $input 2> /dev/null | head -n 1 | cut -f$4 | tr '\n\r' ' '`" @@ -74,7 +74,7 @@ if [ "true" == "$desc" ] ; then tmp="--descend $tmp" fi - /data/users/david/anaconda3/bin/python $dir/ParseDb.py sort -d $input --outdir $PWD/outdir --outname output -f $field $tmp + python3 $dir/ParseDb.py sort -d $input --outdir $PWD/outdir --outname output -f $field $tmp mv $PWD/outdir/output_parse-sort.tab $output elif [ "update" == "$action" ] ; then field="`cat $input 2> /dev/null | head -n 1 | cut -f$4 | tr '\n\r' ' '`" @@ -86,7 +86,7 @@ else regex="" fi - /data/users/david/anaconda3/bin/python $dir/ParseDb.py update -d $input --outdir $PWD/outdir --outname output -f $field -u $value -t $replace $regex + python3 $dir/ParseDb.py update -d $input --outdir $PWD/outdir --outname output -f $field -u $value -t $replace $regex mv $PWD/outdir/output_parse-update.tab $output fi