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
fe83e33a
Commit
fe83e33a
authored
Nov 09, 2023
by
Theo Serralta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created a program for unaligned sequences
parent
c7b394b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
non_align_bam.py
non_align_bam.py
+23
-0
No files found.
non_align_bam.py
0 → 100644
View file @
fe83e33a
import
pysam
samfile
=
pysam
.
AlignmentFile
(
"/home/theo/dev/git/cnvCallerGPU/3544.bam"
,
"rb"
)
non_align
=
pysam
.
AlignmentFile
(
"non_align.bam"
,
"wb"
,
header
=
samfile
.
header
)
for
read
in
samfile
:
if
read
.
is_unmapped
:
non_align
.
write
(
read
)
samfile
.
close
()
non_align
.
close
()
non_align_file
=
pysam
.
AlignmentFile
(
"/home/theo/non_align.bam"
,
"rb"
)
total
=
0
for
read
in
non_align_file
:
#print(read)
#print(f"Chromosome: {read.reference_name}")
#print(f"Position: {read.reference_start}")
#print(f"Non aligné: {read.is_unmapped}")
total
+=
1
print
(
f
"Total de sequences non alignées : {total}"
)
non_align_file
.
close
()
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