Answers.Body: <p>It seems that currently AnnotSV does not support HPO terms usage an Singularity.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-28T23:10:50.193Z
Answers.LastActivityDate: 2023-08-28T23:10:50.193Z
Answers.UserDisplayName: Indira
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-06T14:05:51.687Z
Comments.Text: The manual says `-hpo` and you're using `--hpo`. Could that be the problem?
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-06T19:01:51.337Z
Comments.Text: 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.?
Comments.UserDisplayName: Indira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-06T20:04:18.993Z
Comments.Text: Try adding a `--no-mount` flag immediately after `singularity exec` in the command.
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-06T20:08:42.567Z
Comments.Text: 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
Comments.UserDisplayName: Indira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-06T20:21:42.180Z
Comments.Text: Oops, my bad. I did not read the documentation properly, sorry. Try `singularity exec --no-mount hostfs AnnotSV`
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-13T13:56:38.873Z
Comments.Text: This error is persistent and I am not sure how to get around it.
Comments.UserDisplayName: Indira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-13T14:25:42.170Z
Comments.Text: Is this the page from which you're getting the singularity image link: https://lbgi.fr/AnnotSV/downloads
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-13T14:55:57.670Z
Comments.Text: 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.
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-13T20:51:00.313Z
Comments.Text: Yes the singularity is from the link
Comments.UserDisplayName: Indira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-14T00:36:58.473Z
Comments.Text: 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
  ```
Comments.UserDisplayName: Indira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-14T00:45:13.730Z
Comments.Text: The folder I gave was under the annotationsDir flag but the error persists.
Comments.UserDisplayName: Indira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-14T17:09:30.050Z
Comments.Text: 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.
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-15T19:07:42.887Z
Comments.Text: What is pastebin?
Comments.UserDisplayName: Indira
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-15T22:17:50.607Z
Comments.Text: Did you Google it?
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-14T18:52:19.180Z
Comments.Text: I did - it seems that AnnotSV doesn't work well with Singularity so this could not be done.
Comments.UserDisplayName: Indira
Tags: <singularity>
Title: Singularity, AnnotSV and HPO
ThreadText: # Singularity, AnnotSV and HPO
  
  (Asked by: username_0 on 2023-06-05)
  
  I am trying to use [AnnotSV](https://lbgi.fr/AnnotSV/) to annotate some Manta outputs in the following code with the [HPO term](https://hpo.jax.org/app/) changed:
  
  Where:
  
  * input\_dir is the input directory
  * singularity\_container is the path to the AnnotSV singularity container
  
  ```bash
  # 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](https://lbgi.fr/AnnotSV/Documentation/README.AnnotSV_latest.pdf) 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.
  
  
  ---
  
  