Skip to content

Commit f0bd524

Browse files
authored
Update 2.1.2_host_prediction_II.md
1 parent a803ba2 commit f0bd524

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

_episodes/2.1.2_host_prediction_II.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -227,25 +227,26 @@ Finally, we will combine the results from RaFAH and BLAST to compare the two met
227227
> #SBATCH --mem=50G
228228
> #SBATCH --time=02:00:00
229229
> #SBATCH --job-name=rafah
230-
> #SBATCH --output=./2.1_host_prediction/10_rafah/rafah.slurm.%j.out
231-
> #SBATCH --error=./2.1_host_prediction/10_rafah/rafah.slurm.%j.err
230+
> #SBATCH --output=10_rafah/rafah.slurm.%j.out
231+
> #SBATCH --error=10_rafah/rafah.slurm.%j.err
232+
>
233+
> assembly='../1.3_virus_identification/30_filter_contigs/assembly.fasta'
234+
> contigs='10_rafah/split_contigs'
235+
> mkdir -p "$contigs"
232236
>
233-
> assembly='./1.3_virus_identification/40_results_filter_contigs/assembly.fasta'
234-
> contigs='./2.1_host_prediction/10_rafah/split_contigs'
235-
>
236237
> # RaFAH expects each genome in a separate file. Activate our virtual environment
237238
> # and run a python script to split our filtered assembly into single files
238-
> source ./py3env/bin/activate
239+
> source ../py3env/bin/activate
239240
>
240241
> # The script requires the assmbly path and a directory for outputting the contigs
241-
> python ./python_scripts/host_prediction/10_split_assembly_file.py $assembly $contigs
242-
>
242+
> python ../python_scripts/2.1_split_assembly.py $assembly $contigs
243+
>
243244
> # deactivate the python environment, just to be sure not to cause problems with the conda environment RaFAH needs
244245
> deactivate
245-
>
246+
>
246247
> # activate the conda environment with the dependencies RaFAH requires
247248
> source /vast/groups/VEO/tools/miniconda3_2024/etc/profile.d/conda.sh && conda activate perl_v5.32.1
248-
>
249+
>
249250
> # set a variable to call the RaFAH script
250251
> rafah='/home/groups/VEO/tools/rafah/RaFAH.pl'
251252
>
@@ -255,21 +256,21 @@ Finally, we will combine the results from RaFAH and BLAST to compare the two met
255256
> # --extension: the extension of the contig files
256257
> # --file_prefix: can specify an output dir here and "run name" (rafah_1) here
257258
>
258-
> perl "$rafah" --predict --genomes_dir $contigs --extension .fasta --file_prefix ./2.1_host_prediction/10_rafah/rafah_1
259+
> perl "$rafah" --predict --genomes_dir $contigs --extension .fasta --file_prefix 10_rafah/rafah_1
259260
>
260261
> # deactivate RaFAH's conda environment
261262
> conda deactivate
262-
>
263+
>
263264
> # Our python script for translating the Taxonomy needs our python environment again
264-
> source ./py3env/bin/activate
265-
>
265+
> source ../py3env/bin/activate
266+
>
266267
> # set the path to the table with the translation between NCBI and GTDB and to RaFAH output
267-
> translation='./2.1_host_prediction/10_rafah/ncbi_to_gtdb.csv'
268-
> rafahtable='./2.1_host_prediction/10_rafah/rafah_1_Host_Predictions.tsv'
269-
>
268+
> translation='10_rafah/ncbi_to_gtdb.csv'
269+
> rafahtable='10_rafah/rafah_1_Host_Predictions.tsv'
270+
>
270271
> # run our script with the appropriate file names as parameters
271-
> python3 ./python_scripts/host_prediction/20_translate_taxonomy.py $rafahtable $translation ./2.1_host_prediction/10_rafah/rafah_1_Host_Predictions_gtdb.csv
272-
>
272+
> python3 ../python_scripts/2.1_translate_ncbi_to_gtdb.py $rafahtable $translation 10_rafah/rafah_1_Host_Predictions_gtdb.csv
273+
>
273274
> deactivate
274275
>```
275276
> {: .source}

0 commit comments

Comments
 (0)