Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libhts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Blaise LI
libhts
Commits
4eb4b3b8
Commit
4eb4b3b8
authored
Feb 06, 2020
by
Blaise Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auto load modules in bam2bigwig.sh
parent
c4715fde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
scripts/bam2bigwig.sh
scripts/bam2bigwig.sh
+14
-1
No files found.
scripts/bam2bigwig.sh
View file @
4eb4b3b8
...
...
@@ -10,7 +10,7 @@
# the first one with library names and the second with size factors.
# If it is a value, it shoud be the size factor.
# Requires:
# * bedops (for bedmap)
# * bedops (for bedmap)
-> module load bedops/2.4.36
# * python3 -> module load Python/3.6.0
# * samtools -> module load samtools/1.9
# * bedtools -> module load bedtools/2.25.0
...
...
@@ -18,6 +18,16 @@
# * parallel (for niceload) -> module load parallel/20170122
# * UCSC-tools (for bedGraphToBigWig) -> module load UCSC-tools/v373
load_tools
()
{
[
bedops
--version
2> /dev/null
]
||
module load bedops/2.4.36
[
python3
-V
2> /dev/null
]
||
module load bedops/2.4.36
[
samtools
--version
2> /dev/null
]
||
module load samtools/1.9
[
bedtools
--version
2> /dev/null
]
||
module load bedtools/2.25.0
[
niceload
--version
2> /dev/null
]
||
module load parallel/20170122
[
bedGraphToBigWig 2> /dev/null
]
||
module load UCSC-tools/v373
}
workdir
=
$(
mktemp
-d
)
cleanup
()
...
...
@@ -42,6 +52,8 @@ error_exit ()
mawk
--version
1> /dev/null 2> /dev/null
||
alias
mawk
=
'awk'
load_tools
||
error_exit
"Some tools are not available"
bam
=
${
1
}
bin_file
=
${
2
}
# Example of how to generate the bin_file from iGenome data:
...
...
@@ -50,6 +62,7 @@ bin_file=${2}
# | sed 's/SN://g' | sed 's/LN://' \
# | bedops --chop 10 - \
# > Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/genome_binned_10.bed
# A genome.dict file can be extracted from a bam file: samtools view -H <bam file>
# Ensure we use a 3 columns minimal bed for bin_file:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment