Skip to content

Instantly share code, notes, and snippets.

fusion_id direct_support discordant_support total_support effect topo chr3 exon3 gene3 transcript3 bp3 chr5 exon5 gene5 transcript5 bp5 new_whitelist new_reportable self_fusion is_hard_filtered meets_support_criteria contains_relevant_domains_3 contains_relevant_domains_5 fusion_domains order_id
be1f8268-44ee-4c99-b0db-e4766db2c977 30 28 58 in-frame NaN 10 18.0 FGFR2 ENST00000457416 123242706 5 2.0 SUB1 ENST00000265073 32589733 False False False False False False False [] 22fwudfy
24a800ce-1d7b-4ce8-9c9a-041508bbbc99 30 28 58 in-frame NaN 5 3.0 SUB1 ENST00000265073 32589733 10 17.0 FGFR2 ENST00000457416 123242706 False False False False False False True [] 22fwudfy
@ionox0
ionox0 / access_qc_aggregator.cwl
Last active May 20, 2021 19:14
access_qc_aggregator.cwl
class: Workflow
cwlVersion: v1.0
id: access_qc_aggregator
label: access_qc_aggregator
$namespaces:
sbg: 'https://www.sevenbridges.com/'
inputs:
- id: duplex_extraction_files
type:
type: array
@ionox0
ionox0 / find_duplicate_fastq_requests.py
Last active April 7, 2021 20:15
find_duplicate_fastq_requests
access_filems = FileMetadata.objects.filter(metadata__recipe='MSK-ACCESS_v1', file__file_type__name='fastq')
access_request_ids = set([f.metadata['requestId'] for f in access_filems])
# --> 103 ACCESS request IDs total
duplicates = File.objects\
.filter(
filemetadata__metadata__requestId__in=access_request_ids,
file_type__name='fastq'
/work/access/production/runs/voyager/staging/small_variants/50948a4f-c4b8-4856-97e5-ece000ddc3d4
/work/access/production/runs/voyager/staging/small_variants/7511548f-f695-497e-9558-51b3d63d27ac
/work/access/production/runs/voyager/staging/small_variants/a99cf55e-ad09-44f6-b50e-44cf4169960b
/work/access/production/runs/voyager/staging/small_variants/fcee2eec-7a7f-4eba-9bfa-841e5234f49f
/work/access/production/runs/voyager/staging/small_variants/7cc7c0c1-b1d5-477a-909e-897362ba3cb5
/work/access/production/runs/voyager/staging/small_variants/547fc37c-fd79-4de1-9013-86f69fb89c27
/work/access/production/runs/voyager/staging/small_variants/85189928-d546-4be0-8542-983d556c16a1
/work/access/production/runs/voyager/staging/small_variants/430b9606-2583-441e-8a2d-f216a4ed97e5
/work/access/production/runs/voyager/staging/small_variants/eabeb028-0d6e-48e8-aff5-33d1f0be99ce
/work/access/production/runs/voyager/staging/small_variants/f44cfe07-e633-4c48-92dd-2a22ccc6a83e
@ionox0
ionox0 / import_access_cnv_and_msi_resources.py
Last active January 4, 2021 20:57
import_access_cnv_and_msi_resources.py
import json
import requests
paths = [
"/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/curated_normal_manifest.txt",
"/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/ACCESS_targets_coverage.bed",
"/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/ACCESS_targets_coverage.txt",
"/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/microsatellites.list",
"/juno/work/access/production/resources/admie/versions/v1.0/ADMIE.joblib"
]
@ionox0
ionox0 / import_access_reference_files.py
Last active January 27, 2021 19:23
import_access_reference_files.py
import requests
gene_list = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/juber-hg19-gene-list.bed',
'file_type': 'bed',
}
hotspots = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/hotspot-list-union-v1-v2_with_TERT.txt',
'file_type': 'txt',
@ionox0
ionox0 / ACCESS_variant_calling_parameters.yaml
Last active September 22, 2020 20:53
ACCESS_variant_calling_parameters.yaml
# Params
mutect_params:
dcov: 5000
read_filter: ['BadCigar']
fraction_contamination: 0.0005
minimum_mutation_cell_fraction: 0.0005
vardict_params:
allele_freq_thres: 0.0005
min_num_variant_reads: 1
@ionox0
ionox0 / brass.sh
Last active January 7, 2020 18:04
brass with singularity
singularity run -B /folder/with/tumor_normal/bams:/tmp /home/johnsoni/brass/quay_io-brass_v6.3.0.simg
brass.pl -c 2 -o myout -t /tmp/tumor.bam -n /tmp/normal.bam
# causes error - why is -d required? ask Peter...
@ionox0
ionox0 / toil_tmp_dirs.md
Last active December 11, 2019 17:15
Understanding Toil temporary directories

Here are all of the current arguments related to input / output / temporary directories used by Toil and cwltool:


cwltool:

--outdir - Final outputs directory

--tmpdir-prefix - This is a prefix for folders that do not yet exist, but will be used as intermediate working directories

@ionox0
ionox0 / bsub_copy.py
Last active January 27, 2020 15:53
Script to copy a bunch of folders using bsub
# Uses bsub with rsync to copy large folders
#
# Uses a walltime limit of 60 hours (should be enough for very large folders)
#
# Runs in parallel across each subfolder of the source folder, and creates logs for each as well
#
# Usage: python bsub_copy.py /source/folder /dest/folder
import os
import sys