<p>It seems that currently AnnotSV does not support HPO terms usage an Singularity.</p>

CC BY-SA 4.0
2023-08-28T23:10:50.193Z
2023-08-28T23:10:50.193Z
Indira
<p>I am trying to use <a href="https://lbgi.fr/AnnotSV/" rel="nofollow noreferrer">AnnotSV</a> to annotate some Manta outputs in the following code with the <a href="https://hpo.jax.org/app/" rel="nofollow noreferrer">HPO term</a> changed:</p>
<p>Where:</p>
<ul>
<li>input_dir is the input directory</li>
<li>singularity_container is the path to the AnnotSV singularity container</li>
</ul>
<pre class="lang-bash prettyprint-override"><code># Loop through the files in the input directory
for file in &quot;<span class="math-container">$input_dir"/*.vcf; do
    # Get the base name of the file without extension
    filename=$</span>(basename &quot;$file&quot; .vcf)

    # Create the output subdirectory within the input directory
    output_dir=&quot;<span class="math-container">$input_dir/AnnotSV_Batch_Run"
mkdir -p "$</span>output_dir&quot;

    # Set the output file path with &quot;_AnnotSV&quot; appended
    output_file=&quot;<span class="math-container">$output_dir/$</span>{filename}_AnnotSV_&quot;

    # Run AnnotSV via Singularity with the base name as output prefix
    singularity exec &quot;<span class="math-container">$singularity_container" AnnotSV -SVinputFile "$</span>file&quot; -genomeBuild GRCh38 --hpo &quot;HP:0000001&quot;  -outputFile &quot;$output_file&quot;
done
</code></pre>
<p>The HPO term I am using is in the jax.org site but when I run it - I get the most peculiar error <code> option not known.</code> but the HPO term is specified in the <a href="https://lbgi.fr/AnnotSV/Documentation/README.AnnotSV_latest.pdf" rel="nofollow noreferrer">AnnotSV manual</a> on page 49 (according to the number on the bottom). As for trying I tried with <code>--HPOterm</code> and <code>hpoterm</code> I tried with and without the <code>:</code> and with and without quotes as well. I am not sure what the issue is but I cannot seem to find the solution. Has anyone perchance used this software before with HPO terms as it seems not to be accepting the input I give it?</p>

CC BY-SA 4.0
2023-06-06T14:05:51.687Z
The manual says `-hpo` and you're using `--hpo`. Could that be the problem?
Ram RS
CC BY-SA 4.0
2023-06-06T19:01:51.337Z
Now I am getting `"/usr/local/share/AnnotSV/Annotations_Human/Genes/GRCh38/refGene.txt.gz" file doesn't exist`
Please check your install - Exit with error.?
Indira
CC BY-SA 4.0
2023-06-06T20:04:18.993Z
Try adding a `--no-mount` flag immediately after `singularity exec` in the command.
Ram RS
CC BY-SA 4.0
2023-06-06T20:08:42.567Z
The --no-mount gives the error `FATAL:   "--no-mount": executable file not found in $PATH` - I also tried with `usr/local/bin/AnnotSV` and it did not work
Indira
CC BY-SA 4.0
2023-06-06T20:21:42.180Z
Oops, my bad. I did not read the documentation properly, sorry. Try `singularity exec --no-mount hostfs AnnotSV`
Ram RS
CC BY-SA 4.0
2023-06-13T13:56:38.873Z
This error is persistent and I am not sure how to get around it.
Indira
CC BY-SA 4.0
2023-06-13T14:25:42.170Z
Is this the page from which you're getting the singularity image link: https://lbgi.fr/AnnotSV/downloads
Ram RS
CC BY-SA 4.0
2023-06-13T14:55:57.670Z
Try downloading the annotations file, uncompressing it and providing it as an input to the `-annotationsDir` parameter. The base image, which is ~400 MB seems to contain only the executable and all the images I see on docker hub are at least 4 gigs, which makes me think they include some sort of resource file that the base image does not have.
Ram RS
CC BY-SA 4.0
2023-06-13T20:51:00.313Z
Yes the singularity is from the link
Indira
CC BY-SA 4.0
2023-06-14T00:36:58.473Z
I believe I am doing this incorrectly as I give it the folder of the `phenotype_to_genes.txt` that I got from HPO but it seems like it still gives `command not found` for a lot this is only part of the error ```/usr/local/etc/AnnotSV/configfile: line 9: -annotationMode:: command not found
/usr/local/etc/AnnotSV/configfile: line 11: -benignAF:: command not found
/usr/local/etc/AnnotSV/configfile: line 13: -candidateGenesFiltering:: command not found
/usr/local/etc/AnnotSV/configfile: line 15: -genomeBuild:: command not found
```
Indira
CC BY-SA 4.0
2023-06-14T00:45:13.730Z
The folder I gave was under the annotationsDir flag but the error persists.
Indira
CC BY-SA 4.0
2023-06-14T17:09:30.050Z
Something is interfering with the shell parsing your command. Add an `echo` in front of the singularity command, then add a `set -x` before the for loop begins. Run the script and paste the output on pastebin, then link to the pastebin content here.
Ram RS
CC BY-SA 4.0
2023-06-15T19:07:42.887Z
What is pastebin?
Indira
CC BY-SA 4.0
2023-06-15T22:17:50.607Z
Did you Google it?
Ram RS
CC BY-SA 4.0
2023-07-14T18:52:19.180Z
I did - it seems that AnnotSV doesn't work well with Singularity so this could not be done.
Indira
<singularity>
Singularity, AnnotSV and HPO
# Singularity, AnnotSV and HPO

(Asked by: username_0 on 2023-06-05)

I am trying to use AnnotSV to annotate some Manta outputs in the following code with the HPO term changed:
Where:

input_dir is the input directory
singularity_container is the path to the AnnotSV singularity container

# Loop through the files in the input directory
for file in "$input_dir"/*.vcf; do
    # Get the base name of the file without extension
    filename=$(basename "$file" .vcf)

    # Create the output subdirectory within the input directory
    output_dir="$input_dir/AnnotSV_Batch_Run"
mkdir -p "$output_dir"

    # Set the output file path with "_AnnotSV" appended
    output_file="$output_dir/${filename}_AnnotSV_"

    # Run AnnotSV via Singularity with the base name as output prefix
    singularity exec "$singularity_container" AnnotSV -SVinputFile "$file" -genomeBuild GRCh38 --hpo "HP:0000001"  -outputFile "$output_file"
done

The HPO term I am using is in the jax.org site but when I run it - I get the most peculiar error  option not known. but the HPO term is specified in the AnnotSV manual on page 49 (according to the number on the bottom). As for trying I tried with --HPOterm and hpoterm I tried with and without the : and with and without quotes as well. I am not sure what the issue is but I cannot seem to find the solution. Has anyone perchance used this software before with HPO terms as it seems not to be accepting the input I give it?

**Tags:** singularity
> **Comments:**
> **username_1**: The manual says `-hpo` and you're using `--hpo`. Could that be the problem?  
> **username_0**: Now I am getting `"/usr/local/share/AnnotSV/Annotations_Human/Genes/GRCh38/refGene.txt.gz" file doesn't exist` Please check your install - Exit with error.?  
> **username_1**: Try adding a `--no-mount` flag immediately after `singularity exec` in the command.  
> **username_0**: The --no-mount gives the error `FATAL:   "--no-mount": executable file not found in $PATH` - I also tried with `usr/local/bin/AnnotSV` and it did not work  
> **username_1**: Oops, my bad. I did not read the documentation properly, sorry. Try `singularity exec --no-mount hostfs AnnotSV`  
> **username_0**: This error is persistent and I am not sure how to get around it.  
> **username_1**: Is this the page from which you're getting the singularity image link: https://lbgi.fr/AnnotSV/downloads  
> **username_1**: Try downloading the annotations file, uncompressing it and providing it as an input to the `-annotationsDir` parameter. The base image, which is ~400 MB seems to contain only the executable and all the images I see on docker hub are at least 4 gigs, which makes me think they include some sort of resource file that the base image does not have.  
> **username_0**: Yes the singularity is from the link  
> **username_0**: I believe I am doing this incorrectly as I give it the folder of the `phenotype_to_genes.txt` that I got from HPO but it seems like it still gives `command not found` for a lot this is only part of the error ```/usr/local/etc/AnnotSV/configfile: line 9: -annotationMode:: command not found /usr/local/etc/AnnotSV/configfile: line 11: -benignAF:: command not found /usr/local/etc/AnnotSV/configfile: line 13: -candidateGenesFiltering:: command not found /usr/local/etc/AnnotSV/configfile: line 15: -genomeBuild:: command not found ```  
> **username_0**: The folder I gave was under the annotationsDir flag but the error persists.  
> **username_1**: Something is interfering with the shell parsing your command. Add an `echo` in front of the singularity command, then add a `set -x` before the for loop begins. Run the script and paste the output on pastebin, then link to the pastebin content here.  
> **username_0**: What is pastebin?  
> **username_1**: Did you Google it?  
> **username_0**: I did - it seems that AnnotSV doesn't work well with Singularity so this could not be done.  

---

## 1 answers

### Answer by username_0 on 2023-08-28. Score: 1 | Accepted answer

It seems that currently AnnotSV does not support HPO terms usage an Singularity.


---

