Skip to content

Instantly share code, notes, and snippets.

View jorvis's full-sized avatar

Joshua Orvis jorvis

  • Institute for Genome Sciences
  • Tulsa, OK, USA
View GitHub Profile
@jorvis
jorvis / parse_survey_scanner.py
Created October 30, 2020 15:05
Eve survey scanner parser
#!/usr/bin/env python3
import sys
from collections import defaultdict
infile = sys.argv[1]
sums = defaultdict(int)
for line in open(infile):
@jorvis
jorvis / gist:424152d0911087bc1a3a43f064215d8a
Created May 2, 2018 15:13
GEO series, platform, & sample files
# GEO DATA FROM GSExxxx ID
----------------------------
^SERIES = GSE65633
!Series_title = RNA-seq analysis of neonatal mouse cochlear hair cells
!Series_geo_accession = GSE65633
!Series_pubmed_id = 25855195
!Series_summary = This study examined transcripts that are enriched in neonatal mouse cochlear hair cells. Hair cells were purified by FACS sorting for GFP fluorescence from the cochleas of transgenic mice in which the endogenous Atoh1 gene was fused with GFP
!Series_overall_design = Two replicates of GFP+ hair cells were compared with all other cochlear cell types that were GFP-
!Series_type = Expression profiling by high throughput sequencing
!Series_contributor = Andrew,K,Groves
sc.pl.violin(adata, gene.gene_symbol, group_by='mygroups', save="{0}.png".format(pid), linewidth=0.3)
Yields:
Traceback (most recent call last):
File "/var/www/gear/cgi/get_violin_plot.cgi", line 81, in <module>
main()
File "/var/www/gear/cgi/get_violin_plot.cgi", line 68, in main
sc.pl.violin(adata, gene.gene_symbol, group_by='mygroups', save="{0}.png".format(pid), linewidth=0.3)
TypeError: violin() got an unexpected keyword argument 'linewidth'
@jorvis
jorvis / .emacs
Created February 3, 2018 00:36
My .emacs file
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
@jorvis
jorvis / polypeptides_missing_product.names
Created July 4, 2017 16:36
Now, how to do with just JOINs?
SELECT f.feature_id
FROM feature f
JOIN cvterm ON f.type_id=cvterm.cvterm_id
WHERE cvterm.name = 'polypeptide'
AND f.feature_id NOT IN (
SELECT f.feature_id
FROM feature f
JOIN cvterm ON f.type_id=cvterm.cvterm_id
JOIN featureprop fp ON f.feature_id=fp.feature_id
JOIN cvterm gpn ON fp.type_id=gpn.cvterm_id
.
├── bin
│   ├── add_gff3_locus_tags.py
│   ├── append_to_column_9_value.py
... lots of files ...
│   ├── validate_feature_boundaries_on_molecules.py
│   └── write_fasta_from_gff.py
├── biocode
│   ├── annotation.py
│   ├── data
include README.rst
graft data
include LICENSE
#!/usr/bin/env python3
"""
Kids do great playing Minecraft together but fight when deciding
in whose world to play? What mode? Difficulty level?
I give them 1 minute to work it out before I run this script
and let it pick instead.
"""
#!/usr/bin/env python3
"""
This assumes you're using either Gnome3 or Unity and have a directory of wallpapers
here:
~/Pictures/Wallpaper
You probably want to set this as a cron to execute at a certain interval: