Skip to content

Instantly share code, notes, and snippets.

View delagoya's full-sized avatar

Angel Pizarro delagoya

View GitHub Profile
@delagoya
delagoya / build_install_hello_mpi.sh
Created February 11, 2022 13:44
Download, build, install Hello World example from MPI tutorial
#!/bin/sh
cd /tmp
git clone https://github.com/mpitutorial/mpitutorial
cd mpitutorial/tutorials/mpi-hello-world/code
# grab the mpicc PATH locations
source /etc/profile.d/efa.sh
make all
cp mpi_hello_world /shared/mpi_hello_world
@delagoya
delagoya / 00_aws_batch_tes_map.md
Last active February 4, 2020 03:03
A mapping of the GA4GH Task Execution Service API schema to AWS Batch

Map of Task Execution Service (TES) to AWS

This document is an overview of how concepts from TES map to concepts in AWS Batch.

AWS Batch - Basic Concepts

AWS Batch ("Batch") has a few basic concepts that need to be understood before we can make a comparison to concepts in TES. Some relate directly to TES and others do not.

Job

@delagoya
delagoya / Dockerfile
Last active May 1, 2023 20:57
Dcokerfile for installing AWS CLI on top of rocker/r-base image.
FROM rocker/r-base
RUN apt-get update
# install python tools
RUN apt-get install -y python-dev python-pip
# install AWS CLI
RUN pip install -U awscli

Port 22 is BLOCKED! HALP!

The MCW auditorium wifi blocks the standard SSH network port, port 22. If you are to successfully connect to the EC2 instance from the MCW guest wifi, you will need to change the default port that the SSH service provides for connections. You will also need to allow network traffic to that port on the EC2 instance.

Step 1: the userdata script

The following Bash shell script will be used to add a port to the SSH service.

Amazon Web Services

Implementing a simple AWS Lambda function

In this lab, we will use the chalice Python serverless web application framework for AWS to create a REST API endpoint to reverse complement a DNA string using AWS Lambda and Amazon API Gateway.

# install chalice
$ pip install chalice
@delagoya
delagoya / test.avdl
Last active July 27, 2023 19:55
Avro IDL comments to Avrodoc example 2
@namespace("com.example")
/**
This is a comment for the whole protocol
*/
protocol Example {
/**
The comment applies to the `NoSpaces` record, but is not indented to the
@delagoya
delagoya / test.avdl
Created July 30, 2014 19:50
Exmaple Avro files for discussion Markdown comments
@namespace("com.example")
/**
This is a comment for the whole protocol
*/
protocol Example {
/**
This is a paragraph with a
multi-line comment and
no spaces in between.
@delagoya
delagoya / example.xml
Last active December 16, 2015 14:20 — forked from anonymous/example.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<indexedmzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.2_idx.xsd">
<mzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0.xsd" id="April_19_2013_sample002" version="1.1.0">
<cvList count="2">
<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="3.30.0" URI="http://psidev.cvs.sourceforge.net/*checkout*/psidev/psi/psi-ms/mzML/controlledVocabulary/psi-ms.obo"/>
<cv id="UO" fullName="Unit Ontology" version="12:10:2011" URI="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/phenotype/unit.obo"/>
</cvList>
<fileDescription>
<fileContent>
</fileContent>
@delagoya
delagoya / pidler_example.sh
Last active December 10, 2015 21:39
example pidler
# request a single barcode as JSON
curl http://pidler.org/bc
curl http://pidler.org/bc.json
# => {"barcodes":["PA6A24"]}
# request 3 barcodes as JSON
curl http://pidler.org/bc?num=3
curl http://pidler.org/bc.json?num=3
# => {"barcodes":["P5D1EE","PB80CB","PC70A2"]}
@delagoya
delagoya / createrumebs.py
Created February 23, 2012 16:26
RUM EBS volume using boto
#!/usr/bin/env python
import boto
from os import environ
conn = boto.connect_ec2(environ["AWS_ACCESS_KEY_ID"],environ["AWS_SECRET_ACCESS_KEY"])
size = 100
#adjust to the same zone as StarCluster config
zone = "us-east-1a"
# Description: RUMv1.09, BWAv0.6.1, Bowtie2b5, Bowtie0.12.7, GATK1.4, samtools0.1.18
snapshot = "snap-aec239d5"