Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chipseq_analysis
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Astrocyte
Workflows
BICF
chipseq_analysis
Commits
db1c9133
Commit
db1c9133
authored
7 years ago
by
Venkat Malladi
Browse files
Options
Downloads
Patches
Plain Diff
Add in test data and updated scripts.
parent
73082a3c
Branches
Branches containing commit
Tags
publish_0.0.10
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
astrocyte_pkg.yml
+1
-1
1 addition, 1 deletion
astrocyte_pkg.yml
test_data/fetch_test_data.sh
+2
-0
2 additions, 0 deletions
test_data/fetch_test_data.sh
workflow/main.nf
+2
-1
2 additions, 1 deletion
workflow/main.nf
workflow/scripts/qc_fastq.py
+19
-16
19 additions, 16 deletions
workflow/scripts/qc_fastq.py
with
24 additions
and
18 deletions
astrocyte_pkg.yml
+
1
−
1
View file @
db1c9133
...
...
@@ -36,7 +36,7 @@ documentation_files:
# Remember - The workflow file is always named 'workflow/main.nf'
# The workflow must publish all final output into $baseDir
# A list of clu
e
ter environment modules that this workflow requires to run.
# A list of clu
s
ter environment modules that this workflow requires to run.
# Specify versioned module names to ensure reproducability.
workflow_modules
:
-
'
fastqc/0.11.5'
...
...
This diff is collapsed.
Click to expand it.
test_data/fetch_test_data.sh
0 → 100644
+
2
−
0
View file @
db1c9133
wget
-O
ENCLB904PZW_R1.fastq.gz https://www.encodeproject.org/files/ENCFF704XKC/@@download/ENCFF704XKC.fastq.gz
wget
-O
ENCLB904PZW_R2.fastq.gz https://www.encodeproject.org/files/ENCFF707CNX/@@download/ENCFF707CNX.fastq.gz
This diff is collapsed.
Click to expand it.
workflow/main.nf
+
2
−
1
View file @
db1c9133
...
...
@@ -21,7 +21,8 @@ process qc_fastq {
set val(name), file(reads) from read_pairs
output:
file "*_fastqc.{zip,html}" into fastqc_results
file "*_fastqc.{zip,html}" into qc_fastq_results
file "qc.log" into qc_fastq_log
script:
"""
...
...
This diff is collapsed.
Click to expand it.
workflow/scripts/qc_fastq.py
+
19
−
16
View file @
db1c9133
...
...
@@ -5,9 +5,7 @@
import
os
import
subprocess
import
argparse
import
shlex
import
shutil
from
multiprocessing
import
cpu_count
import
logging
import
sys
import
json
...
...
@@ -19,34 +17,35 @@ For more details:
## SETTINGS
logger
=
logging
.
getLogger
(
__name__
)
logger
.
addHandler
(
logging
.
NullHandler
())
logger
.
propagate
=
False
logger
.
setLevel
(
logging
.
INFO
)
LOGGER
=
logging
.
getLogger
(
__name__
)
LOGGER
.
addHandler
(
logging
.
NullHandler
())
LOGGER
.
propagate
=
False
LOGGER
.
setLevel
(
logging
.
INFO
)
def
check_tools
():
'''
Checks for required componenets on user system
'''
logger
.
info
(
'
Checking for required libraries and components on this system
'
)
LOGGER
.
info
(
'
Checking for required libraries and components on this system
'
)
fastqc_path
=
shutil
.
which
(
"
fastqc
"
)
if
fastqc_path
:
logger
.
info
(
'
Found fastqc:%s
'
%
(
fastqc_path
)
)
LOGGER
.
info
(
'
Found fastqc:
%s
'
,
fastqc_path
)
else
:
print
(
"
Please install
'
fastqc
'
before using the tool
"
)
sys
.
exit
()
def
get_args
():
'''
Define arguments.
'''
parser
=
argparse
.
ArgumentParser
(
description
=
__doc__
,
epilog
=
EPILOG
,
formatter_class
=
argparse
.
RawDescriptionHelpFormatter
)
parser
.
add_argument
(
'
-f
'
,
'
--fastq
'
,
help
=
"
The fastq file to run QC check on.
"
,
nargs
=
'
+
'
,
required
=
True
)
help
=
"
The fastq file to run QC check on.
"
,
nargs
=
'
+
'
,
required
=
True
)
args
=
parser
.
parse_args
()
return
args
...
...
@@ -56,19 +55,23 @@ def check_qual_fastq(fastq):
'''
Run fastqc on 1 or 2 files.
'''
qc_command
=
"
fastqc -t -f fastq
"
+
"
"
.
join
(
fastq
)
logger
.
info
(
"
Running fastqc with %s
"
%
(
qc_command
)
)
LOGGER
.
info
(
"
Running fastqc with %s
"
,
qc_command
)
p
=
subprocess
.
Popen
(
qc_command
,
shell
=
True
)
p
.
communicate
()
qual_fastq
=
subprocess
.
Popen
(
qc_command
,
shell
=
True
)
qual_fastq
.
communicate
()
def
main
():
args
=
get_args
()
#
c
reate a file handler
#
C
reate a file handler
handler
=
logging
.
FileHandler
(
'
qc.log
'
)
logger
.
addHandler
(
handler
)
LOGGER
.
addHandler
(
handler
)
# Check if tools are present
check_tools
()
# Run quality checks
check_qual_fastq
(
args
.
fastq
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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