Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Mutation Analyser B
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ii
collabschools
NORBIS-DLN Collaboration School 2022
Mutation Analyser B
Merge requests
!6
Added comments and changed variables names
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added comments and changed variables names
loading_files
into
main
Overview
1
Commits
1
Pipelines
0
Changes
1
Merged
agata.t.wyrozemska
requested to merge
loading_files
into
main
2 years ago
Overview
1
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
main
version 1
4df20bb1
2 years ago
main (base)
and
latest version
latest version
4df20bb1
1 commit,
2 years ago
version 1
4df20bb1
1 commit,
2 years ago
1 file
+
3
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
code/loader_function.py
+
3
−
3
Options
@@ -2,11 +2,12 @@
"""
Created on Mon Jun 27 18:09:27 2022
@author:
Gimli
@author:
Agata and Amrinder
"""
import
pandas
as
pd
def
seq_loader
(
file_dir
):
"""
seq_loader: can be used to read the input files and recognize fasta format features
"""
fasta_seq
=
{}
with
open
(
file_dir
)
as
file_one
:
for
line
in
file_one
:
@@ -20,16 +21,15 @@ def seq_loader(file_dir):
else
:
sequence
=
line
fasta_seq
[
active_sequence_name
].
append
(
sequence
)
print
(
fasta_seq
)
return
fasta_seq
def
octamer_loader
(
file_dir_oct
):
"""
octamer_reader: can be used to read octamer list from .txt files into pandas dataframe
"""
octamer_seq
=
pd
.
read_csv
(
file_dir_oct
,
header
=
0
,
skiprows
=
(
22
),
sep
=
"
,
"
,
index_col
=
False
)
print
(
octamer_seq
)
return
octamer_seq
Loading