Answers.Body: <p>Remove the <code>getAbsolutePath</code> call — your path is already absolute. <code>getAbsolutePath</code> garbles it, as you can see in the error message.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-13T13:00:32.793Z
Answers.Text: By removing the getAbsolutePath call I get the following error:   terminate called after throwing an instance of 'seqan::UnknownExtensionError'
    what():  Unknown file extension of /home/omair/TFG/Files/9827_2#49.bam: iostream error
  
  Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
Answers.UserDisplayName: Omair Iqbal
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-13T13:03:59.577Z
Answers.Text: @OmairIqbal Ensure that seqan was compiled with zlib support. See [here for details](https://github.com/seqan/seqan/issues/871).
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-13T12:28:25.073Z
Answers.LastActivityDate: 2018-03-13T12:28:25.073Z
Answers.UserDisplayName: Konrad Rudolph
Body: <p>When I try to open a simple bam file with the SeqAn library using the following code:</p>
  
  <pre><code>CharString bamFileInName = getAbsolutePath("/home/omair/TFG/Files/9827_2#49.bam")
  BamFileIn bamFileIn(toCString(bamFileInName));
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>terminate called after throwing an instance of 'seqan::FileOpenError'
    what():  Could not open file /home/omair/Programs/seqan//home/omair/TFG/Files/9827_2#49.bam: iostream error
  
  Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
  </code></pre>
  
  <p>The file exists and the path is correct.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T19:20:10.107Z
Comments.Text: cross posted: https://www.biostars.org/p/302804/
Comments.UserDisplayName: Pierre
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-12T21:53:05.720Z
Comments.Text: Do you really have a file called `/home/omair/TFG/Files/9827_2#49.bam`? Please [edit] your question and show the exact code you are using. What you have posted has to be a copy/paste error, it makes no sense.
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-13T15:38:31.640Z
Comments.Text: Duplicate of https://bioinformatics.stackexchange.com/questions/3804/cannot-open-bam-files-with-the-seqan-library
Comments.UserDisplayName: Kamil S Jaron
Tags: <sam><reads><c++>
Title: While opening a Bam file with the SeqAn library I get 'seqan::FileOpenError'
ThreadText: # While opening a Bam file with the SeqAn library I get 'seqan::FileOpenError'
  
  (Asked by: username_0 on 2018-03-12)
  
  When I try to open a simple bam file with the SeqAn library using the following code:
  
  ```
  CharString bamFileInName = getAbsolutePath("/home/username_0/TFG/Files/9827_2#49.bam")
  BamFileIn bamFileIn(toCString(bamFileInName));
  
  ```
  
  I get the following error:
  
  ```
  terminate called after throwing an instance of 'seqan::FileOpenError'
    what():  Could not open file /home/username_0/Programs/seqan//home/username_0/TFG/Files/9827_2#49.bam: iostream error
  
  Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
  
  ```
  
  The file exists and the path is correct.
  
  **Tags:** sam, reads, c++
  
  > **Comments:**
  > **username_1**: cross posted: https://www.biostars.org/p/302804/  
  > **username_2**: Do you really have a file called `/home/username_0/TFG/Files/9827_2#49.bam`? Please [edit] your question and show the exact code you are using. What you have posted has to be a copy/paste error, it makes no sense.  
  > **username_3**: Duplicate of https://bioinformatics.stackexchange.com/questions/3804/cannot-open-bam-files-with-the-seqan-library  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2018-03-13. Score: 3
  
  Remove the `getAbsolutePath` call — your path is already absolute. `getAbsolutePath` garbles it, as you can see in the error message.
  
  > **Comments:**
  > **username_0**: By removing the getAbsolutePath call I get the following error:   terminate called after throwing an instance of 'seqan::UnknownExtensionError'   what():  Unknown file extension of /home/username_0/TFG/Files/9827_2#49.bam: iostream error  Process finished with exit code 134 (interrupted by signal 6: SIGABRT)  
  > **username_5**: @username_0 Ensure that seqan was compiled with zlib support. See [here for details](https://github.com/seqan/seqan/issues/871).  
  
  ---
  
  