generated from carpentries-incubator/template
-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-generated via {sandpaper} Source : 0c69edc Branch : md-outputs Author : GitHub Actions <[email protected]> Time : 2024-04-25 14:15:22 +0000 Message : markdown source builds Auto-generated via {sandpaper} Source : cbe6adb Branch : main Author : Graeme Grimes <[email protected]> Time : 2024-04-25 14:13:53 +0000 Message : Merge pull request #145 from carpentries-incubator/pythoncode Pythoncode
- Loading branch information
1 parent
5118b65
commit 1241c38
Showing
13 changed files
with
2,138 additions
and
1,975 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//process_python_script.nf | ||
nextflow.enable.dsl=2 | ||
|
||
process PROCESS_READS { | ||
|
||
script: | ||
""" | ||
process_reads.py ${projectDir}/data/yeast/reads/ref1_1.fq.gz | ||
""" | ||
} | ||
|
||
workflow { | ||
PROCESS_READS() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
import gzip | ||
import sys | ||
reads = 0 | ||
bases = 0 | ||
|
||
# Read gzipped fastq file | ||
with gzip.open(sys.argv[1], 'rb') as read: | ||
for id in read: | ||
seq = next(read) | ||
reads += 1 | ||
bases += len(seq.strip()) | ||
next(read) | ||
next(read) | ||
|
||
print("reads", reads) | ||
print("bases", bases) |
Oops, something went wrong.