##overview - tenha certeza que os packages estão instalados corretamente. vou colocar desde a instalação do bioconductor até a instalação dos packages dessa sessão.
##install bioconductor if (!requireNamespace(“BiocManager”, quietly = TRUE)) install.packages(“BiocManager”) BiocManager::install(version=“3.10”)
BiocManager::install(“BSgenome.Hsapiens.UCSC.hg19”) BiocManager::install(c(“genefilter”,“geneplotter”))
##PACKAGES DA SESSÃO 1
BiocManager::install(c(“genefu”, “COPDSexualDimorphism.data”, “GenomicRanges”, “gwascat”, “hgu133a.db”, “genomicsclass/tissuesGeneExpression”))
#NOTA: o pacote genefu fornece informações e funções para analise da expressão gênica com enfase no cancer de mama.
library(genefu) data(sig.gene70) dim(sig.gene70) head(sig.gene70)[,1:6]
#PERGUNTA NUMERO UM
#How was the MammaPrint 70 gene signature designed?
#MammaPrint é baseado na assinatura do gene Amsterdam 70 do gene do câncer de mama e usa FFPE (FFPE) ou tecido fresco para análise de microarranjos (microarray)
#How many components of the signature have a missing value (NA) for the associated NCBI gene symbol? #Remember to use is.na(), not == NA, to count missing values.
#tente: sum(is.na(sig.gene70$NCBI.gene.symbol))
#What is the NCBI gene symbol for the gene with the Description “cyclin E2”?
#tente: sig.gene70\(NCBI.gene.symbol[which(sig.gene70\)Description == “cyclin E2”)]
#Kinases are important for cell-cell communications; see the Wikipedia entry on Kinase for some background.
#The grep() function takes a pattern and a vector and returns the indexes of the vector that match the pattern. Remember that you can see documentation and learn how to use a function with ?grep.
#You can use grep() on the Description field of the sig.gene70 data frame to search for substrings of long gene names.
#How many of the members of the 70-gene signature are genes coding for kinases? #Search the vector for the term “kinase” and count the number of entries.
#tente: length(grep(“kinase”, sig.gene70$Description))
##PACKAGES USADOS:
library(COPDSexualDimorphism.data) data(lgrc.expr.meta)
#NOTA:para adicionar o expr.meta data.frame ao seu espaço de trabalho. A pkyrs variável em expr.metadata.frame representa maços de anos fumados. Outras variáveis incluem gendere diagmaj(estado da doença). Essas variáveis correspondem a fenótipos.
#What is the number of female participants in this study?: #Try the table() function, which counts the number of elements with each value, on the gender column
#TENTE: table(expr.meta$gender)
#The summary() function gives a five-number summary of the distribution of a vector of numeric data.
#What is the median of the distribution of pack years smoked in this cohort?
#TENTE summary(expr.meta$pkyrs)
##What is the mean number of pack years smoked in this cohort?
summary(expr.meta$pkyrs)
##What is the maximum number of pack years smoked in this cohort?
summary(expr.meta$pkyrs)
#True or False: The distribution of pack-years smoked is well-approximated by a Gaussian (normal) probability distribution. #If you have never made a QQ-plot, you may want to start with Statistics and R before taking this course
qqnorm(expr.meta\(pkyrs) qqline(expr.meta\)pkyrs)
#The units with which a quantity is recorded are not always the most effective for statistical analysis.
#Use the command boxplot(pkyrs~gender, data=expr.meta) to examine the distributions of pack years by gender using the boxplot statistics and outlier flagging.
#Which of the following is an aspect of the display that would suggest caution in using the t-test in comparing males and females with respect to pack years smoked? #Not familiar with boxplots or the t-test? You may wish to start with Statistics and R.
#EXPLICAÇÃO:Todas as proposições entre as escolhas são verdadeiras, mas a validade do teste t é comprometida quando aplicado a variáveis com distribuições assimétricas. A validade do teste não depende da separação dos valores medianos ou magnitude do quartil, então a primeira e a última escolha estão incorretas. A diferença no número de outliers sinalizados pode ser importante, mas a preocupação mais sistemática com a assimetria das distribuições é a resposta alvo para esse problema.
#What is a SNP?
#NOTA: Os estudos de associação do genoma (GWAS) são uma ferramenta importante dos epidemiologistas genéticos. Em um desenho de caso-controle, os indivíduos com uma doença específica (casos) são identificados junto com outros indivíduos semelhantes que estão livres da doença (controles). Chips SNP ou sequenciamento de DNA são então usados para obter genótipos de indivíduos para um grande número de SNPs. As distribuições de genótipos para todos os SNPs são comparadas entre casos e controles, e os SNPs que exibem associação com a doença são investigados para um possível insight sobre a interrupção da regulação ou função do gene.
#O pacote Bioconductor gwascat inclui informações em um catálogo de resultados GWAS. Carregue o pacote gwascat e verifique a versão do catálogo GWAS armazenado nas coordenadas GRCh37 (hg19). Também carregaremos o pacote GenomicRanges que inclui métodos para trabalhar com o objeto de dados.
##PACKAGES USADOS NO EXERCICIO:
library(GenomicRanges) library(gwascat) data(ebicat37) ebicat37
#Use table() on the CHR_ID column to count the number of GWAS hits on each chromosome. Sort the chromosomes by decreasing number of hits so that the first element has the most GWAS hits.
#sort(table(ebicat37$CHR_ID),decreasing=TRUE) #Which chromosome has the most GWAS hits in the catalog? Use an integer.
sort(table(ebicat37$CHR_ID), decreasing = TRUE)[1]
#Use mcols(ebicat37)[,“DISEASE/TRAIT”] to access the names of diseases with genetic associations recorded in the gwascat package.
##What is the disease/trait with the most associations?
sort(table(mcols(ebicat37)[,“DISEASE/TRAIT”]), decreasing=TRUE)[1]
#in a typical somatic human cell, before DNA replication, how many DNA copies are there for most genes (ignore X and Y chromosomes)?
#EXPLICAÇÃO: Os humanos são uma espécie diplóide, o que significa que as células somáticas geralmente contêm duas cópias dos cromossomos autossômicos (não X ou Y), antes da fase S, na qual os cromossomos são duplicados.
#In a single cell, how many RNA copies of a given gene are there?
#EXPLICAÇÃO: O número de cópias do RNA depende de quanto o gene está sendo transcrito. “Genes domésticos”, como aqueles usados para fazer RNA ribossômico ou de transferência, são transcritos em alta taxa, enquanto outros, como o mRNA para alguns fatores de transcrição, são transcritos com menos frequência. Alguns genes não são transcritos em certos tipos de células.
#Which of the following is most likely to be inherited in all the cells of all your body across a generation (e.g. from either of your parents to you)
#EXPLICAÇÃO: As informações genéticas, como polimorfismos de nucleotídeo único, têm uma chance de serem transmitidas através das gerações. Os transcritos de mRNA e proteínas, como os fatores de transcrição, degradam-se com o tempo e, o mais importante, não se replicam. Em outras palavras, o DNA (não as proteínas ou o RNA) é conhecido como a principal molécula de herança genética. (Nota lateral: há casos de mRNA e proteínas sendo herdados temporariamente, por exemplo, o mRNA que está no óvulo no momento em que é fertilizado pelo espermatozóide.)
#As a yeast cell of species S. cerevisiae passes from cell-cycle phase G1 to phase S, a bud begins to form and enlarge. When we distinguish between yeast colonies in the pre-budding and budding conditions, we are comparing
#EXPLICAÇÃO: A existência ou não existência do botão é uma característica de baixa dimensão do organismo.