~alienagain/curious_butterfly

77316d52390bcfb07cece50dbf11ae5426ef444b — alien 1 year, 8 months ago f702fd6
created an user friendly script for analysis
5 files changed, 42 insertions(+), 1 deletions(-)

A aaa.csv
A aaaa.csv
A form.sh
A sparkling_goblin.csv
M sparkling_goblin.raku
A aaa.csv => aaa.csv +1 -0
@@ 0,0 1,1 @@
samples,aaa

A aaaa.csv => aaaa.csv +1 -0
@@ 0,0 1,1 @@
samples,aaaa

A form.sh => form.sh +38 -0
@@ 0,0 1,38 @@
#!/bin/sh

zenity --forms --title="New analysis" \
	--text="Enter configuration:" \
	--separator="," \
	--add-entry="Folder" \
	--add-entry="Threat name" >> threat.csv

case $? in
    0)
        echo "Configuration set"
	name=$(csvtool col 2-2 threat.csv)
	mv threat.csv* "$name.csv"

	folder2=$(csvtool col 1-1 $name.csv)
	;;
    1)
        echo "Nothing configured."
	;;
    -1)
        echo "An unexpected error has occurred."
	;;
esac

read -p"Continue? Y/N :  " answer

if [ "$answer" = "Y" ]; then
	echo "Starting analysis: "
#	folder2=$(csvtool col 1-1 $name.csv)
	
	echo $folder2

	for i in "$folder2"/*; do
		rakudo $name.raku --fi="$i" --fo=.
	done
else
	echo "okay! bye!"
fi

A sparkling_goblin.csv => sparkling_goblin.csv +1 -0
@@ 0,0 1,1 @@
samples,sparkling_goblin

M sparkling_goblin.raku => sparkling_goblin.raku +1 -1
@@ 35,7 35,7 @@ sub MAIN (Str :$fi = '', Str :$fo = '') {
    for "$fo/$fi".IO.lines -> $line {
        # If the line contains the gene, print it
         if $line ~~ &sparkling_goblin {say "Sparkling Goblin found: "; say $line; say "in line $c"; say " "; }
	 if $line ~~ &sparkling2 {say "Sparkling Goblin complex regex found: "; say $line; say "in line $c"; say " "; }
	 #if $line ~~ &sparkling2 {say "Sparkling Goblin complex regex found: "; say $line; say "in line $c"; say " "; }

	 $c++;
    }