Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scRNA-seq-simulation
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
zavolan_group
pipelines
scRNA-seq-simulation
Commits
11896ade
Commit
11896ade
authored
3 years ago
by
Kathleen Moriarty
Browse files
Options
Downloads
Patches
Plain Diff
fix docstring text
parent
b2f1355c
No related branches found
No related tags found
1 merge request
!17
Issue 7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/read_sequencing.py
+21
-16
21 additions, 16 deletions
src/read_sequencing.py
with
21 additions
and
16 deletions
src/read_sequencing.py
+
21
−
16
View file @
11896ade
"""
Read Sequencing
"""
Read Sequencing!
Simulate the sequencing of reads on the template of terminal fragments and simulates reads of these fragments.
Author: Kathleen Moriarty
Class: Programming for Life Sciences
"""
def
read_sequencing
(
frag_file_name
,
output_file_name
,
num_reads
,
read_len
,
num_seq_cyc
):
"""
Reads a fasta-formatted file of terminal fragments and simulates reads of these fragments.
def
read_sequencing
(
frag_file_name
,
output_file_name
,
num_reads
,
read_len
,
num_seq_cyc
,
)
->
None
:
"""
Reads a fasta-formatted file of terminal fragments and simulates reads.
Simulate the sequencing of reads on the template of terminal
fragments. Reads are copies of fixed length starting
...
...
@@ -13,19 +20,17 @@ def read_sequencing(frag_file_name, output_file_name, num_reads, read_len, num_s
is larger than the fragment length, sequencing would in
principle proceed into the 3
'
adaptor and then would perhaps
yield random bases. For simplicity, here we assume that random
nucleotides are introduced in this case.
:param output_file_name: file name where to store the output
:param num_seq_cyc: integer of number of cycles
:param read_len: integer of identical read length
:param num_reads: number of total reads to simulate
:param frag_file_name: input file of terminal fragments
Output:
Fasta-formatted file (
"
../output/reads.csv
"
) of reads of identical length, representing 5’
ends of the terminal fragments
nucleotides are introduced in this case. Saves a fasta-formatted
file of reads of identical length, representing 5’
ends of the terminal fragments as .txt.
Args:
frag_file_name (string): input file of terminal fragments
output_file_name (string): file name where to store the output
num_reads: number of total reads to simulate
read_len: integer of identical read length
num_seq_cyc: integer of number of cycles
"""
# Import classes
from
random
import
choices
,
randrange
import
numpy
as
np
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment