This file contains hidden or 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
| # References: | |
| # https://cran.r-project.org/bin/linux/debian/ | |
| # https://rviews.rstudio.com/2018/03/21/multiple-versions-of-r/ | |
| # 2023/12/30 | |
| sudo nano /etc/apt/sources.list # deb-src http://deb.debian.org/debian/ unstable main | |
| sudo apt update | |
| sudo apt build-dep r-base | |
| wget https://cran.r-project.org/src/base/R-4/R-4.3.2.tar.gz |
This file contains hidden or 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
| 0.3114754098360656 | 0.4101123595505618 | |
|---|---|---|
| 0.4499089253187615 | 0.4082397003745317 | |
| 0.3460837887067396 | 0.5580524344569288 | |
| 0.8105646630236795 | 0.7584269662921348 | |
| 0.785063752276867 | 0.7584269662921348 | |
| 0.7777777777777779 | 0.7584269662921348 | |
| 0.7686703096539163 | 0.7584269662921348 | |
| 0.7231329690346083 | 0.7602996254681647 | |
| 0.7085610200364298 | 0.7602996254681647 | |
| 0.6976320582877961 | 0.7584269662921348 |
This file contains hidden or 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
| -3.2510638297872343 | -231.0344827586207 | |
|---|---|---|
| -2.2808510638297874 | -170.68965517241372 | |
| -2.612765957446809 | -151.72413793103442 | |
| 3.1063829787234054 | 246.55172413793102 | |
| 3.846808510638298 | 246.55172413793102 | |
| 2.7234042553191484 | 175.86206896551727 | |
| 2.340425531914893 | 194.82758620689657 | |
| 2.519148936170212 | 158.62068965517244 | |
| 2.187234042553192 | 162.0689655172414 | |
| 2.187234042553192 | 146.55172413793105 |
This file contains hidden or 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
| Download Raw counts | |
| ```{r} | |
| library(TCGAbiolinks) | |
| proj <- "TCGA-GBM" | |
| query <- GDCquery( | |
| project = proj, | |
| data.category = "Transcriptome Profiling", | |
| data.type = "Gene Expression Quantification", | |
| workflow.type = "STAR - Counts" |
This file contains hidden or 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
| sudo singularity build rnaseq3 rnaseq3.def | |
| ./rnaseq3 cat /etc/os-release # debian 11, host=ubuntu 2204 | |
| ./rnaseq3 samtools --version # 1.10 | |
| ./rnaseq3 STAR --version # 2.5.2b | |
| ./rnaseq3 fastqc -v # v0.12.1 | |
| ./rnaseq3 kallisto | head 1 # 0.50.1 | |
| ./rnaseq3 subread # command not found | |
| ./rnaseq3 featureCounts -v | head # v2.0.6 | |
| ./rnaseq3 ls /opt/conda/bin | |
| ./rnaseq3 which gcc # 10.2.1 |
This file contains hidden or 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
| library(survival) | |
| # Function to generate survival data | |
| generate_data <- function(sample_size, event_rate_group1, event_rate_group2) { | |
| group <- c(rep(1, sample_size), rep(0, sample_size)) | |
| event_times <- c(rexp(sample_size, rate = event_rate_group1), | |
| rexp(sample_size, rate = event_rate_group2)) | |
| observed <- rep(1, sample_size * 2) # Assuming all events are observed | |
| data <- data.frame(group = group, event_times = event_times, observed = observed) | |
| return(data) |
This file contains hidden or 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
| library(shiny) | |
| # Define the UI | |
| ui <- fluidPage( | |
| titlePanel("Rainbow Color Palette"), | |
| sidebarLayout( | |
| sidebarPanel( | |
| sliderInput("s_value", "Saturation (s):", min = 0, max = 1, value = 1, step = 0.01), | |
| sliderInput("v_value", "Value (v):", min = 0, max = 1, value = 1, step = 0.01) | |
| ), |
This file contains hidden or 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
| import requests | |
| from requests.auth import HTTPBasicAuth | |
| username = "USERNAME" | |
| app_password = "API_PASSWORD" | |
| base_url = f"https://api.bitbucket.org/2.0/repositories/{username}" | |
| def fetch_repositories(url): | |
| response = requests.get(url, auth=HTTPBasicAuth(username, app_password)) | |
| response.raise_for_status() # Raises an error for bad status codes |
This file contains hidden or 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
| calculate_total <- function(items) { | |
| subtotal <- sum(items) | |
| tax_rate <- getOption("TAX_RATE", default = 0.1) # Default 10% tax | |
| total <- subtotal * (1 + tax_rate) | |
| return(round(total, 2)) | |
| } | |
| # Test the function with default tax rate | |
| cart1 <- c(10, 20, 30) | |
| print(calculate_total(cart1)) # Output: 66.00 |
This file contains hidden or 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
| 1. The Elevator Pitch Summary | |
| Prompt: "Summarise this paper in 3–5 sentences, as if you're explaining it to a colleague in an elevator ride." | |
| 2. Key Findings Extraction | |
| Prompt: "List the top 5 key findings or conclusions from this paper, along with a brief explanation of each." | |
| 3. Methodology Breakdown | |
| Prompt: "Explain the methodology used in this study in simple terms. What are its strengths and potential limitations?" | |
| 4. Literature Review Assistant |