Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chipseq_analysis
Manage
Activity
Members
Labels
Plan
Issues
19
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
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
BICF
Astrocyte
chipseq_analysis
Merge requests
!9
Remove fastqc step.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Remove fastqc step.
11-remove-fastqc
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Venkat Malladi
requested to merge
11-remove-fastqc
into
master
7 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Closes
#11 (closed)
Removes Fastqc script and step
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
7a3a2bb0
1 commit,
7 years ago
1 file
+
0
−
79
Expand all files
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
workflow/scripts/qc_fastq.py deleted
100755 → 0
+
0
−
79
Options
#!/usr/bin/env python3
'''
QC check of raw .fastq files using FASTQC.
'''
import
os
import
subprocess
import
argparse
import
shutil
import
logging
import
sys
import
json
EPILOG
=
'''
For more details:
%(prog)s --help
'''
## SETTINGS
logger
=
logging
.
getLogger
(
__name__
)
logger
.
addHandler
(
logging
.
NullHandler
())
logger
.
propagate
=
False
logger
.
setLevel
(
logging
.
INFO
)
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
)
args
=
parser
.
parse_args
()
return
args
def
check_tools
():
'''
Checks for required componenets on user 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
)
else
:
logger
.
error
(
'
Missing fastqc
'
)
raise
Exception
(
'
Missing fastqc
'
)
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
)
qual_fastq
=
subprocess
.
Popen
(
qc_command
,
shell
=
True
)
out
,
err
=
qual_fastq
.
communicate
()
def
main
():
args
=
get_args
()
# Create a file handler
handler
=
logging
.
FileHandler
(
'
qc.log
'
)
logger
.
addHandler
(
handler
)
# Check if tools are present
check_tools
()
# Run quality checks
check_qual_fastq
(
args
.
fastq
)
if
__name__
==
'
__main__
'
:
main
()