Skip to content

Commit

Permalink
Update 2.2.3_visualizing_taxonomy.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vmkhot authored Sep 24, 2024
1 parent 811d492 commit 720d2b5
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions _episodes/2.2.3_visualizing_taxonomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,25 +318,30 @@ with open(graph_filename) as json_file:
> #SBATCH --mem=5G
> #SBATCH --time=00:10:00
> #SBATCH --job-name=taxonomic_graph
> #SBATCH --output=30_results_taxonomic_graph/taxonomic_graph.slurm.%j.out
> #SBATCH --error=30_results_taxonomic_graph/taxonomic_graph.slurm.%j.err
> #SBATCH --output=./2.2_taxonomy/40_plot_networks/taxonomic_graph.slurm.%j.out
> #SBATCH --error=./2.2_taxonomy/40_plot_networks/taxonomic_graph.slurm.%j.err
>
> # activate the python virtual environment with the packages we need
> source ../py3env/bin/activate
>
> # in this sbatch script, its not necessarry to create the directory,
> # we already told sbatch to create it for the log files.
> mkdir -p 30_results_taxonomic_graph
> mkdir -p ./2.2_taxonomy/40_plot_networks/
>
> # define an array with contig ids to plot
> declare -a arr=("contig_10" "contig_109", "contig_164")
>
>
> # loop through the array
> for contig in "${arr[@]}"
> do
> # run our script for plotting the network around a contig of choice
> python 30_taxonomic_graph.py ../2.2_viral_taxonomy/02_vcontact3_results_new_contig_names/graph.cyjs 30_results_taxonomic_graph/"$contig"_graph.png $contig
> # run our scripts for plotting the network around a contig of choice
> # PLOT CONTIG IN LOCAL GENE SHARING NETWORK
> python python_scripts/taxonomy/30_taxonomic_graph_local.py ../2.2_viral_taxonomy/02_vcontact3_results_new_contig_names/graph.cyjs ./2.2_taxonomy/40_plot_networks/"$contig"_graph_local.png $contig
>
> # PLOT CONTIG IN GLOBAL GENE SHARING NETWORK
> python python_scripts/taxonomy/30_taxonomic_graph_global.py ../2.2_viral_taxonomy/02_vcontact3_results_new_contig_names/graph.cyjs ./2.2_taxonomy/40_plot_networks/"$contig"_graph_global.png $contig
> done
>
>
> # deactivate the environment
> deactivate
Expand Down

0 comments on commit 720d2b5

Please sign in to comment.