Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cnvCallerGPU
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gad-public
cnvCallerGPU
Commits
89f57db8
Commit
89f57db8
authored
1 year ago
by
Theo Serralta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creation of a test to read bam with gpu
parent
040df464
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
exo_bam_gpu.py
exo_bam_gpu.py
+24
-0
No files found.
exo_bam_gpu.py
0 → 100644
View file @
89f57db8
import
pysam
seq_inf
=
{}
samfile
=
pysam
.
AlignmentFile
(
"/home/theo/Documents/alternance/Projet Alternance/dijex8000.bam"
,
"rb"
)
for
read
in
samfile
.
fetch
(
until_eof
=
True
):
seq_id
=
read
.
query_name
chro
=
read
.
reference_name
start
=
read
.
reference_start
lenght
=
read
.
query_length
end
=
read
.
reference_end
seq_inf
[
chro
]
=
{}
seq_inf
[
chro
]
.
append
({
"seq_id"
:
seq_id
,
"start"
:
start
,
"end"
:
end
,
"lenght"
:
lenght
,
})
samfile
.
close
()
def
depth_function
(
data
):
for
chro
,
data
in
seq_inf
.
items
():
depth
=
[
0
]
*
[
-
1
][
"end"
]
+
1
#on crée une liste qui stock la profondeur de chaque chromosome. On prend la dernière position lue de chaque dictionnaire. On rajoute +1 parce que ça compte à partir de 0.
for
position
in
range
(
start
,
end
+
1
):
depth
[
position
]
+=
1
depth_function
(
seq_info
)
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment