This file contains hidden or 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
| My thoughts on workflow execution services (WES) from previous discussion. Note: I'm not all that crash hot at setting up web servers/infrastructure. | |
| Nextflow tower/Seqera platform/whatever it's called now | |
| Cost: ~70-100k per year from what I hear - do not quote me. edit: if you are in australia you can access this service for free/reduce price. | |
| Documentation: Good docs, easy to follow albeit the install instructions seem to be scattered (could be just the service provider I was using) | |
| Setup: Smooth, has a few dependencies but they're relatively easy to install on a VM machine for testing purposes (docker, slurm). Java gave me some headaches due to the weird VM I had setup. But once compiled the tower agent, it worked fine. | |
| Workflow engines supported: Nextflow only. | |
| Comments: Supports on-prem hardware which is really cool (needs SLURM), can specify cloud storage or data stored locally. Web interface relies on the nextflow.config being properly configured (nf-core guidelines work ~95% |
This file contains hidden or 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
| import re | |
| from pathlib import Path | |
| import argparse | |
| parser = argparse.ArgumentParser( | |
| description='Convert BioEdit Project binary file to fasta', | |
| prog='bio2fasta', | |
| formatter_class=argparse.ArgumentDefaultsHelpFormatter | |
| ) |
This file contains hidden or 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 code pulls data from the WHO's influenza surveillance database: | |
| https://apps.who.int/flumart/Default?ReportNo=12 | |
| This website is pretty tricky to parse; you must pass realistic headers to the POST requests, and you must also | |
| issue 3 total requests: 1) a GET request, 2) a POST request, and 3) another POST request. All 3 of these requests, | |
| in order, are required to actually collect the underlying data that's displayed in the table. See `get_table_data` | |
| for more documentation on this process. |
This file contains hidden or 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
| import argparse | |
| import textwrap | |
| import os | |
| import sys | |
| from datetime import timedelta, datetime | |
| # function for reading a multifasta file | |
| # returns a dictionary with sequence headers and nucleotide sequences | |
| def get_seqs_from_fasta(filepath): |
This file contains hidden or 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
| mle <- function(data,start=NULL,eps=10**(-9),logit=FALSE,cov=NULL){ | |
| # INPUT: | |
| # data: data matrix with | |
| # 1) observed outcome D (0: no; 1: yes) | |
| # 2) observed types at risk for (0: no; 1: yes) | |
| # start: starting vector for the algorithm | |
| # eps: accuracy parameter to stop the algorithm | |
| # logit: logical to indicate whether the logit model is used | |
| # (i.e. correct for a covariate) | |
| # cov: covariate vector to correct for (only if logit=TRUE) |