diff --git a/bin/1.2_filter_motifs/compareBed.sh b/bin/1.2_filter_motifs/compareBed.sh index 5aa5f45..d358865 100644 --- a/bin/1.2_filter_motifs/compareBed.sh +++ b/bin/1.2_filter_motifs/compareBed.sh @@ -8,7 +8,7 @@ # BED-format. # For parameter description, run the script without parameters or -h. -# The output is a file with the filtered footprints and the log file FilterMotivs.stats +# The output is a file with the filtered footprints and the log file compareBed.stats # One R scripts is used, compareBed_runinfo.R, stored in the same directory. @@ -120,7 +120,7 @@ then echo " default is the current directory" echo " -min --min minimum size of footprints; default is 10" echo " -max --max maximum size of footprints; default is 80" - echo " -o --output output path/file ; default dir current directory and filename is newMotifs.bed and newMotifs.fasta" + echo " -o --output output path/file ; default dir current directory and filename is newMotifs.bed and newMotifs.bed.fasta" echo " -h --help shows this help message" exit 0 fi @@ -260,7 +260,7 @@ fi # remove short/long motivs, make unique ids (relevant for some splitted tfbs from subtract) and handle maxScorePosition # also creates a small output file with information about the comparison -Rscript $path/compareBed_runinfo.R $min $max $data "$workdir"/filtered.bed "$workdir"/filtered_flagged.bed "$workdir"/FilterMotifs.stats +Rscript $path/compareBed_runinfo.R $min $max $data "$workdir"/filtered.bed "$workdir"/filtered_flagged.bed "$workdir"/compareBed.stats # check if Rscript executed without errors if [ $? -gt 0 ] then @@ -277,14 +277,14 @@ then fp_initial=`expr $fp_initial - 1` fp_final=`cat "$workdir"/filtered.bed | wc -l` fp_final=`expr $fp_final - 1` - echo $fp_initial | sed 's/^/initial number of footprints: /g' >> "$workdir"/FilterMotifs.stats - echo $fp_final | sed 's/^/number of footprints after subtract: /g' >> "$workdir"/FilterMotifs.stats + echo $fp_initial | sed 's/^/initial number of footprints: /g' >> "$workdir"/compareBed.stats + echo $fp_final | sed 's/^/number of footprints after subtract: /g' >> "$workdir"/compareBed.stats else # output will be overwritten if it exists rm -f $output # add some final values to the log file - cat $data | wc -l | sed 's/^/initial number of footprints: /g' >> "$workdir"/FilterMotifs.stats - cat "$workdir"/filtered.bed | wc -l | sed 's/^/number of footprints after subtract: /g' >> "$workdir"/FilterMotifs.stats + cat $data | wc -l | sed 's/^/initial number of footprints: /g' >> "$workdir"/compareBed.stats + cat "$workdir"/filtered.bed | wc -l | sed 's/^/number of footprints after subtract: /g' >> "$workdir"/compareBed.stats fi # add fasta sequences to bed and create fasta file