Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudia Mengoni committed Mar 7, 2023
1 parent 79d5810 commit c53586b
Show file tree
Hide file tree
Showing 8 changed files with 602 additions and 218,405 deletions.
18 changes: 18 additions & 0 deletions analysis_scripts/run_diamond.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

basedir=${PWD}
species=$1
faa=$2

echo ${basedir}
echo $species
echo ${faa}
./../diamond makedb --in ${faa} -d ${basedir}/${species}/diamond_refseq

mkdir -p ${basedir}/${species}/Comparison/GFs/diamond
for x in $(ls ${basedir}/${species}/Comparison/GFs/fasta)
do
echo $x
./../diamond blastx -d ${basedir}/${species}/diamond_refseq -q ${basedir}/${species}/Comparison/GFs/fasta/$x -o ${basedir}/${species}/Comparison/GFs/diamond/$x.tsv;
done

14 changes: 14 additions & 0 deletions analysis_scripts/run_ete3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
basedir=${PWD}
for sp in synth_myco synth_ecoli synth_paeru; do
for frag in 0.5 0.8 1; do
species=${sp}/${frag}
echo ${species}
#conda activate ete3
ete3 compare -t ${basedir}/${species}/Comparison/GFs/CG/msa_delos/concat.tree \
${basedir}/${species}/Roary/output/core_gene_alignment_renamed.tree \
${basedir}/${species}/Comparison/GFs/CG/msa_genapi/concat.tree \
${basedir}/${species}/Comparison/GFs/CG/msa_panaroo/concat.tree \
-r ${basedir}/${sp}/1/Comparison/GFs/CG/msa_prova/${sp}.tree --unrooted > ${basedir}/${species}/Comparison/ete3.log
done
done
9 changes: 9 additions & 0 deletions analysis_scripts/run_fasttree.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

basedir=${PWD}
species=$1
faa=$2
out=$3

./../FastTree -gtr -nt ${faa} > ${out}

13 changes: 13 additions & 0 deletions analysis_scripts/run_mafft.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

basedir=${PWD}
species=$1
faa=$2
out=$3

echo ${basedir}
echo $species
echo ${faa}

mafft ${faa} > ${out}

2 changes: 1 addition & 1 deletion process_metagenomes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@
"source": [
"import subprocess\n",
"faa_reference = prokkadir+'/prokka_'+ref_genome+'/*.faa'\n",
"ret=subprocess.call(['bash',basedir+\"/run_diamond.sh\",species,faa_reference],stdout=subprocess.DEVNULL)"
"ret=subprocess.call(['bash',basedir+\"/analysis_scripts/run_diamond.sh\",species,faa_reference],stdout=subprocess.DEVNULL)"
]
},
{
Expand Down
Loading

0 comments on commit c53586b

Please sign in to comment.