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
# purpose: use Basic Access Authentication to download data from a web server | |
# example usage: python <this file>.py --url https://cancer.sanger.ac.uk/cosmic/file_download/GRCh37/cosmic/v85/VCF/CosmicCodingMuts.vcf.gz --username email@example.com --password mycosmicpassword | |
# for more on Basic access authentication see: https://en.wikipedia.org/wiki/Basic_access_authentication | |
import requests | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--url') | |
parser.add_argument('--username') |
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
# purpose | |
# ------- | |
# strip directory and suffix (argument 3) from path (argument 1) forming a prefix | |
# return the concatenation of prefix, argument 2, and suffix | |
# usage | |
# ----- | |
# ./insert.sh "dir/file.vcf" ".normalized" ".vcf" | |
# file.normalized.vcf |
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
#!/bin/bash | |
# python solution at: https://stackoverflow.com/a/39225039/6674256 | |
# another solution is "rclone", but it requires setup and OAuth | |
# another solution is Google Drive API, but it requires setup and OAuth too | |
# another solution is https://github.com/odeke-em/drive, but it requires setup and OAuth too | |
fileid=$1 # use "Get shareable link" in your Google Drive to access the file ID | |
filename=$2 | |
curl --cookie-jar ./cookie --location "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null |
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
#!/usr/bin/env bash | |
# download segmental duplications | |
seg_dups='genomicSuperDups' | |
seg_dups_final=$seg_dups.sorted.bed.gz | |
if [[ ! -e $seg_dups_final ]]; then | |
echo "downloading, unzipping, bed-ifying segmental duplication data..." | |
# database schema | |
wget http://hgdownload.soe.ucsc.edu/goldenPath/hg19/database/$seg_dups.sql |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python | |
import requests | |
import argparse | |
import sys | |
import gzip | |
import os | |
parser = argparse.ArgumentParser(description='fetch and parse self chain data from UCSC database') | |
parser.add_argument('--genome_build', type=str, help='e.g., "hg19" or "hg38"') |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer