-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export and document some more things? #19
Comments
I don't know about exporing the fields like reader.* should be exprted, but this package should certainly have some sort of getter method to provide a stable api for getting that info. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First, thanks for this package! I made some functions for creating objects from my GenomicVectors.jl package using your BAM reader functions. I think I found the right functions.
Chromosome names and lengths:
function GenomeInfo(name, reader::BioAlignments.BAM.Reader)
GenomeInfo(name,
reader.refseqnames,
reader.refseqlens
)
end
Chromosome name and alignment start and end positions:
read_bam = function(bam_file)
# iterate over BAM records
chr = String[]
left_pos = Int64[]
right_pos = Int64[]
for record in reader
push!(chr, BAM.refname(record))
push!(left_pos, leftposition(record))
push!(right_pos, rightposition(record))
end
DataFrame(chr = chr, left = left_pos, right = right_pos)
end
Should/could reader.refseqnames, reader.refseqlens and BAM.refname be exported? I'd be happy to add the exports, some docstrings and a bit of README text if you are open to it.
The text was updated successfully, but these errors were encountered: