-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from cmeesters/fixes
Fixes
- Loading branch information
Showing
29 changed files
with
974 additions
and
234 deletions.
There are no files selected for viewing
Binary file not shown.
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,41 @@ | ||
Copyright (c) 2024, Snakemake Teaching Alliance + Christian Meester & JGU Mainz | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
* Neither the name of Christian Meesters or the JGU Mainz nor the names of | ||
its contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
SAMPLE SCRIPTS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CHRISTIAN MEESTERS OR THE JGU | ||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
---------------------- | ||
|
||
Please note: | ||
|
||
* This handout does not display material to be used as a reference. | ||
* In particular, the recepient has been informed that people new | ||
to Snakemake and HPC should partake this course themselves as (some) | ||
material can and will be outdated, eventually. | ||
* This is a handout release: Slides are merged and some (graphical) | ||
content has been dropped. | ||
* Sample scripts and (where applicable) solutions are provided. The above | ||
notice applies. | ||
|
||
|
||
Please direct suggestion for improvements to https://github.com/cmeesters/snakemake-hpc-teaching-material/issues . |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,54 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
import sys | ||
import os | ||
import shutil | ||
import subprocess | ||
import shlex | ||
import zipfile | ||
|
||
def run_pdflatex(master): | ||
pwd = os.getcwd() | ||
if os.sep in master: # probably a path | ||
basename = os.path.basename(master) | ||
dirname = os.path.dirname(master) | ||
os.chdir(dirname) | ||
master = basename | ||
call = r'pdflatex -synctex=1 -interaction=nonstopmode "\def\ishandout{1} \input{' + master + r'}"' | ||
subprocess.call(shlex.split(call)) | ||
os.chdir(pwd) | ||
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('--version', required = True, | ||
help = "indicate the handout version, e.g. edition") | ||
parser.add_argument('--master-tex', required = True, | ||
help = "indicate a TeX master document") | ||
parser.add_argument('--sample-directory', required = True, | ||
help = "path to directory with script files (cloze and solution") | ||
args = parser.parse_args() | ||
|
||
master = args.master_tex | ||
|
||
print(f"Typesetting Handout Version for '{master}'") | ||
#run_pdflatex(master) | ||
|
||
handout_version = os.path.splitext(master)[0] + '.pdf' | ||
final_place = os.path.basename(handout_version) | ||
|
||
file_list=[(handout_version, final_place), | ||
('handout/README.txt', 'README.txt')] | ||
opj = os.path.join | ||
for root, dirs, files in os.walk(args.sample_directory): | ||
for fname in files: | ||
# restrict to sample files, no helper files | ||
if 'copy' in fname or 'README' in fname: continue | ||
file_list.append((opj(root,fname), opj(*root.split('/')[1:],fname))) | ||
|
||
buildzipfname = 'snakemake_intro_%s.zip' % args.version | ||
z = zipfile.ZipFile(buildzipfname, 'w', compression = zipfile.ZIP_DEFLATED) | ||
for item in file_list: | ||
z.write(item[0], item[1]) | ||
z.close() | ||
|
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
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,18 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- snakemake-minimal >=8.4.4 | ||
- snakemake-executor-plugin-slurm | ||
- snakemake-storage-plugin-fs | ||
- jinja2 | ||
- matplotlib | ||
- graphviz | ||
- bcftools =1.19 | ||
- samtools =1.19.2 | ||
- bwa =0.7.17 | ||
# - pysam =0.22 | ||
# at the time of writing - 7. Feb 24 - pysam will require | ||
# a lower python version than snakemake, install pysam | ||
# using pip | ||
- pygments |
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 @@ | ||
"${SHELL}" <(curl -L micro.mamba.pm/install.sh) |
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
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
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
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
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
Oops, something went wrong.