Skip to content

Instantly share code, notes, and snippets.

View crazyhottommy's full-sized avatar
🎯
Focusing

Ming Tang crazyhottommy

🎯
Focusing
View GitHub Profile
---
title: "02_bioc_curated_TCGA_data"
author: "Ming Tang"
date: "November 9, 2017"
output: html_document
---
```{r}
devtools::install_github(repo = "BioinformaticsFMRP/TCGAbiolinks")
library(here)
#!/bin/bash
# function Extract for common file formats
function extract {
if [ -z "$1" ]; then
# display usage if no parameters given
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
else
if [ -f "$1" ] ; then
NAME=${1%.*}
human mouse
A1BG A1bg
A1CF A1cf
A2LD1 A2ld1
A2M A2m
A4GALT A4galt
A4GNT A4gnt
AAAS Aaas
AACS Aacs
AADAC Aadac
```{r}
library(GEOquery)
library(tidyverse)
meta<- getGEO(GEO= "GSE185507",GSEMatrix=FALSE)
```
```{r}
meta@gsms$GSM5616943@header$characteristics_ch1
```
```{r}
TAAs<- c("MSLN", "EGFR", "ERBB2", "CEACAM5", "NECTIN4", "EPCAM", "MUC16", "MUC1", "CD276",
"FOLH1", "DLL3", "VTCN1", "PROM1", "PVR", "CLDN6", "MET", "FOLR1", "TNFRSF10B", "TACSTD2")
```
```{r}
TCGAExprsAndPheno2 <- function(gene_vector, cancer_types = "all", expression_type = "TPM"){
library(recount3)
## Get all possible projects
## get all the promoter sequences for human hg19 genome
## Author: Ming Tang (Tommy)
## Date: 04/30/2015
## load the libraries
library(GenomicRanges)
library(BSgenome.Hsapiens.UCSC.hg19)
BSgenome.Hsapiens.UCSC.hg19
# or
Hsapiens
@crazyhottommy
crazyhottommy / mount smb on ubuntu.md
Created July 13, 2017 20:28
mounting smb on ubuntu

I use sshfs to mount remote servers. but I also want to connecting windows servers to my ubuntu.

If there's one good thing that I can say about Windows XP is that it supports the SMB protocol. This enables a computer running Windows to share files, folders, and more with another PC. All that other PC needs is the right software to take advantage of the SMB protocol. Luckily, that software is available for GNU/Linux.

on mac, I can click the Finder bar --->Go---> Connect to Server and then type in the address.

@crazyhottommy
crazyhottommy / case_when.r
Last active March 5, 2023 04:07
R tricks
> library(dplyr)
> cars %>%
as_tibble %>%
mutate(case_code = case_when(
speed == 4 & dist == 2 ~ "this",
dist > 6 & dist == 10 ~ "is",
speed >=10 & dist >= 18 ~ "awesome"))
# A tibble: 50 × 3
@crazyhottommy
crazyhottommy / bkup_dotfiles_configs.md
Last active November 27, 2022 07:31 — forked from sbamin/bkup_dotfiles_configs.md
How to rsync dot files and directories of remote server

backup dotfiles

  • Following will copy all of dot ~/. files and directories (including its contents) directly underneath home directory.
  • To avoid copying cache and other local configs, e.g., that of web browser, java apps, etc., preferably query directory size tool under entire home $HOME/, using ncdu $HOME of similar tool.
  • Exclude all those large directories using rsync --exclude=.local --exclude=.cache format
  • Avoid rsync password, ssh keys, .bash_history, etc. if you are uploading to github, etc.
  • rsync home dotfiles and configs as follows:
# in your local machine