Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Read strand #39

Closed
sssxie opened this issue Mar 21, 2022 · 1 comment
Closed

Read strand #39

sssxie opened this issue Mar 21, 2022 · 1 comment

Comments

@sssxie
Copy link

sssxie commented Mar 21, 2022

I would like to know how to get the strand information of the read from nucleus.io.sam.SamReader, since I am working with bam files of long-read transcriptome.

@pichuan
Copy link
Collaborator

pichuan commented Mar 23, 2022

Hi @sssxie
Use this field:

bool reverse_strand = 3;

For example, in DeepVariant we use the strand information as one of our channels in our representation. Here is the C++ code that reads it: https://github.com/google/deepvariant/blob/c8fae5bd5f6c587bba733d83263a694aca252098/deepvariant/pileup_image_native.cc#L296

You can access the same field in the Python code as well once you have a Read.

@pichuan pichuan closed this as completed Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants