You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download the file ex1_header.sam, then run this code in Atom
using BioAlignments
reader = open(SAM.Reader, "ex1_header.sam");
find(header(reader), "SQ")
Context
Obviously, I am a Julia beginner. I am trying to learn how to read a SAM file and a BAM file using BioAlignments. The documentation refers to "data.sam" and "data.bam" which are only generic hypothetical files. I would like to have a fully reproducible example with a real file instead such as ex1_header.sam from https://github.com/BioJulia/BioFmtSpecimens/tree/master/SAM
I tried to add Bio but received this error message:
(v1.1) pkg> add Bio
Updating registry at `C:\Users\aalexandersson\.julia\registries\General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Bio [3637df68]:
Bio [3637df68] log:
├─possible versions are: [0.1.0, 0.2.0-0.2.3, 0.3.0, 0.4.0-0.4.7] or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0, 0.2.0-0.2.3, 0.3.0, 0.4.0-0.4.7]
└─restricted by julia compatibility requirements to versions: uninstalled - no versions left
Then I successfully installed BioAlignments individually.
Your Environment
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, nehalem)
Environment:
JULIA_EDITOR = "C:\Users\aalexandersson\AppData\Local\atom\app-1.29.0\atom.exe" -a
JULIA_NUM_THREADS = 4
There seems to be a typo in the file BioAlignments.jl/docs/src/hts-files.md
Expected Behavior
I expected this code to work in Julia 1.1.0:
find(header(reader), "SQ")
I suggest to use findall() instead of find(), like this:
findall(header(reader), "SQ")
Current Behavior
The current code gives this error:
UndefVarError: find not defined
The suggested change instead results in this:
Possible Solution / Implementation
Replace find() with findall() for Julia 1.x.
Steps to Reproduce (for bugs)
Download the file ex1_header.sam, then run this code in Atom
Context
Obviously, I am a Julia beginner. I am trying to learn how to read a SAM file and a BAM file using BioAlignments. The documentation refers to "data.sam" and "data.bam" which are only generic hypothetical files. I would like to have a fully reproducible example with a real file instead such as ex1_header.sam from https://github.com/BioJulia/BioFmtSpecimens/tree/master/SAM
I tried to add Bio but received this error message:
Then I successfully installed BioAlignments individually.
Your Environment
The text was updated successfully, but these errors were encountered: