Gene set enrichment analysis is a popular approach for prioritising the biological processes perturbed in genomic datasets. The Bioconductor project hosts over 80 software packages capable of gene set analysis. Most of these packages search for enriched signatures amongst differentially regulated genes to reveal higher level biological themes that may be missed when focusing only on evidence from individual genes. With so many different methods on offer, choosing the best algorithm and visualization approach can be challenging. The EGSEA package solves this problem by combining results from up to 12 prominent gene set testing algorithms to obtain a consensus ranking of biologically relevant results.This workflow demonstrates how EGSEA can extend limma-based differential expression analyses for RNA-seq and microarray data using experiments that profile 3 distinct cell populations important for studying the origins of breast cancer. Following data normalization and set-up of an appropriate linear model for differential expression analysis, EGSEA builds gene signature specific indexes that link a wide range of mouse or human gene set collections obtained from MSigDB, GeneSetDB and KEGG to the gene expression data being investigated. EGSEA is then configured and the ensemble enrichment analysis run, returning an object that can be queried using several S4 methods for ranking gene sets and visualizing results via heatmaps, KEGG pathway views, GO graphs, scatter plots and bar plots. Finally, an HTML report that combines these displays can fast-track the sharing of results with collaborators, and thus expedite downstream biological validation. EGSEA is simple to use and can be easily integrated with existing gene expression analysis pipelines for both human and mouse data. In an effort to unify these computational methods and knowledge-bases, theEGSEA R/Bioconductor package was developed. EGSEA, which stands forEnsemble of Gene Set Enrichment Analyses5 combines the results from multiple algorithms to arrive at a consensus gene set ranking to identify biological themes and pathways perturbed in an experiment. EGSEA calculates seven statistics to combine the individual gene set statistics of base GSE methods to rank biologically relevant gene sets. The current version of theEGSEA package6 utilizes the analysis results of up to twelve prominent GSE algorithms that include:ora7,globaltest8,plage9,safe10,zscore11,gage12,ssgsea13,padog14,gsva15,camera16,roast17 andfry17. Theora,gage,camera andgsva methods depend on acompetitive null hypothesis which assumes the genes in a set do not have a stronger association with the experimental condition compared to randomly chosen genes outside the set. The remaining eight methods are based on aself-contained null hypothesis that only considers genes within a set and again assumes that they have no association with the experimental condition.Gene set enrichment analysis allows researchers to efficiently extract biological insights from long lists of differentially expressed genes by interrogating them at a systems level. In recent years, there has been a proliferation of gene set enrichment (GSE) analysis methods released through the Bioconductor projectEGSEAdata package that includes more than 25,000 gene sets for human and mouse organised according to their database sources  and c1–c7) that explore different biological themes ranging from very broad  through to more specialised ones focusing on cancer  and immunology (c7). The other main sources are GeneSetDB3 and KEGG4 which have similar collections focusing on different biological characteristics 18 that consists of 3 cell populations  and Mature Luminal (ML)) sorted from the mammary glands of female virgin mice. Triplicate RNA samples from each population were obtained in 3 batches and sequenced on an Illumina HiSeq 2000 using a 100 base-pair single-ended protocol. Raw sequence reads from the fastq files were aligned to the mouse reference genome (mm10) using theRsubread package19. Next, gene-level counts were obtained usingfeatureCounts20 based onRsubread’s built-inmm10 RefSeq-based annotation. The raw data along with further information on experimental design and sample preparation can be downloaded from the Gene Expression Omnibus  using GEO Series accession number GSE63310 and will be preprocessed according to the RNA-seq workflow published by Lawet al. (2016)21.The first experiment analysed in this workflow is an RNA-seq dataset from Sheridanet al. (2010)22 and is the microarray equivalent of the RNA-seq dataset mentioned above. The same 3 populations , LP and ML) were sorted from mouse mammary glands via flow cytometry. Total RNA from 5 replicates of each cell population were hybridised onto 3 Illumina MouseWG-6 v2 BeadChips. The intensity files and chip annotation file available in Illumina’s proprietary formats (IDAT and BGX respectively) can be downloaded fromhttp://bioinf.wehi.edu.au/EGSEA/arraydata.zip. The raw data from this experiment is also available from GEO under Series accession number GSE19446.The second experiment analysed in this workflow comes from Limet al. (2016) which performs a differential gene expression analysis on this data set using the Bioconductor packagesedgeR23,limma24 andGlimma25 with gene annotation from theMus.musculus package26. Thelimma package offers a well-developed suite of statistical methods for dealing with differential expression for both microarray and RNA-seq datasets and will be used in the analyses of both datasets presented in this workflow.Our RNA-seq analysis follows on directly from the workflow of Lawhttp://bioinf.wehi.edu.au/EGSEA/mam.rnaseq.rdata. The code below loads the preprocessed count matrix from Lawet al. (2016), performs TMM normalisation27 on the raw counts, and calculates voom weights for use in comparisons of gene expression between Basal and LP, Basal and ML, and LP and ML populations.To get started with this analysis, download the R data file from> library(limma)> library(edgeR)> load("mam.rnaseq.rdata")> names(mam.rnaseq.data)[1] "samples" "counts"  "genes"> dim(mam.rnaseq.data)[1] 14165     9> x = calcNormFactors> design = model.matrix(~0+x$samples$group+x$samples$lane)> colnames(design) = gsub)> colnames(design) = gsub)> head(design)   Basal LP ML L006 L008	 1     0  1  0    0    0	 2     0  0  1    0    0	 3     1  0  0    0    0	 4     1  0  0    1    0	 5     0  0  1    1    0	 6     0  1  0    1    0	 > contr.matrix = makeContrasts)> head(contr.matrix)       Contrasts Levels  BasalvsLP BasalvsML LPvsML	   Basal	        1	  1	 0	   LP	       -1	  0	 1	   ML	        0	 -1	-1	   L006	        0	  0	 0	   L008	        0	  0	 0                                            voom function28 from thelimma package converts counts to log-counts-per-million (log-cpm) and calculates observation-level precision weights. Thevoom object (v) contains normalized log-cpm values and gene information used by all of the methods in the EGSEA analysis below. The precisionweights stored withinv are also used by thecamera,roast andfry gene set testing methods.The> v = voom                        > names(v)                        [1] "genes"   "targets" "E"       "weights" "design"                                            et al. (2016), as a detailed explanation of these steps is beyond the scope of this article.For further information on preprocessing see Lawvoom object (v), a design matrix (design) and an optional contrasts matrix (contr.matrix). The design matrix describes how the samples in the experiment relate to the coefficients estimated by the linear model29. The contrasts matrix then compares two or more of these coefficients to allow relative assessment of differential expression. Base methods that utilize linear models such as those fromlimma andGSVA  make use of the design and contrasts matrices directly. For methods that do not support linear models, these two matrices are used to extract the group information for each comparison.The EGSEA algorithm makes use of theEGSEAdata includes more than 25,000 gene sets organized in collections depending on their database sources. Summary information about the gene set collections available inEGSEAdata can be displayed as follows:The package> library(EGSEAdata)> egsea.data("mouse")The following databases are available in EGSEAdata for Mus  musculus:                        Database name: KEGG PathwaysVersion: NADownload/update date: 07 March 2017Data source: gage::kegg.gsetsSupported species: human, mouse, ratGene set collections: Signaling, Metabolism, DiseaseRelated data objects: kegg.pathwaysNumber of gene sets in each collection for Mus  musculus :Signaling: 132Metabolism: 89Disease: 67                        Database name: Molecular Signatures Database (MSigDB)Version: 5.2Download/update date: 07 March 2017Data source: http://software.broadinstitute.org/gseaSupported species: human, mouseGene set collections: h, c1, c2, c3, c4, c5, c6, c7Related data objects: msigdb, Mm.H, Mm.c2, Mm.c3, Mm.c4, Mm.c5, Mm.c6, Mm.c7Number of gene sets in each collection for  Mus musculus :h Hallmark Signatures: 50c2 Curated Gene Sets: 4729c3 Motif Gene Sets: 836c4 Computational Gene Sets: 858c5 GO Gene Sets: 6166c6 Oncogenic Signatures: 189c7 Immunologic Signatures: 4872                        Database name: GeneSetDB DatabaseVersion: NADownload/update date: 15 January 2016Data source: http://www.genesetdb.auckland.ac.nz/Supported species: human, mouse, ratGene set collections: gsdbdis, gsdbgo, gsdbdrug, gsdbpath, gsdbregRelated data objects: gsetdb.human, gsetdb.mouse, gsetdb.ratNumber of gene sets in each collection for  Mus musculus :GeneSetDB Drug/Chemical: 6019GeneSetDB Disease/Phenotype: 5077GeneSetDB Gene Ontology: 2202GeneSetDB Pathway: 1444GeneSetDB Gene Regulation: 201                        Type ?<data object name> to get a specific informationabout it, e.g., ?kegg.pathways.                                            ?) command, for instance?Mm.c2 will return more information on the mouse version of the c2 collection from MSigDB. The above information can be returned as a list:As the output above suggests, users can obtain help on any of the collections using the standard R help > names(info)[1] "kegg"   "msigdb" "gsetdb"> info$msigdb$info$collections[1] "h"  "c1" "c2" "c3" "c4" "c5" "c6" "c7"                                            EGSEA package, the KEGG pathways, c2 (curated gene sets) and c5 (Gene Ontology gene sets) collections from the MSigDB database are selected. Next, an index is built for each gene set collection using the EGSEA indexing functions to link the genes in the different gene set collections to the rows of our RNA-seq gene expression matrix. Indexes for the c2 and c5 collections from MSigDB and for the KEGG pathways are built using thebuildIdx function which relies on Entrez gene IDs as its key. In theEGSEAdata gene set collections, Entrez IDs are used as they are widely adopted by the different source databases and tend to be more consistent and robust since there is one identifier per gene in a gene set. It is also relatively easy to convert other gene IDs into Entrez IDs.To highlight the capabilities of the> library(EGSEA)> gs.annots = buildIdx, go.part = TRUE)[1] "Loading MSigDB Gene Sets ... "[1] "Loaded gene sets for the collection c2 ..."[1] "Indexed the collection c2 ..."[1] "Created annotation for the collection c2 ..."[1] "Loaded gene sets for the collection c5 ..."[1] "Indexed the collection c5 ..."[1] "Created annotation for the collection c5 ..."MSigDB c5 gene set collection has been partitioned intoc5BP, c5CC, c5MF[1] "Building KEGG pathways annotation object ... "> names(gs.annots)[1] "c2"   "c5BP" "c5CC" "c5MF" "kegg"                                            summary,show andgetSetByName (orgetSetByID) can be invoked on an object of classGSCollectionIndex, which stores all of the relevant gene set information, as follows:To obtain additional information on the gene set collection indexes, including the total number of gene sets, the version number and date of last revision, the methods> class(gs.annots$c2)[1] "GSCollectionIndex"attr[1] "EGSEA"> summary(gs.annots$c2)c2 Curated Gene Sets (c2): 4726 gene sets - Version: 5.2, Update date: 07 March 2017> show(gs.annots$c2)An object of class "GSCollectionIndex"Number of gene sets: 4726Annotation columns: ID, GeneSet, BroadUrl, Description, PubMedID, NumGenes, ContributorTotal number of indexing genes: 14165Species: Mus musculusCollection name: c2 Curated Gene SetsCollection unique label: c2Database version: 5.2Database update date: 07 March 2017> s = getSetByNameID: M13072GeneSet: SMID_BREAST_CANCER_LUMINAL_A_DNBroadUrl: http://www.broadinstitute.org/gsea/msigdb/cards/SMID_BREAST_CANCER_LUMINAL_A_DN.htmlDescription: Genes down-regulated in the luminal A subtype of breast cancer.PubMedID: 18451135NumGenes: 23/24Contributor: Jessica Robertson> class(s)[1] "list"> names(s)[1] "SMID_BREAST_CANCER_LUMINAL_A_DN"> names(s$SMID_BREAST_CANCER_LUMINAL_A_DN)[1] "ID"          "GeneSet"     "BroadUrl"     "Description" "PubMedID"[6] "NumGenes"    "Contributor"                                            GSCollectionIndex store for each gene set the Entrez gene IDs in the slotoriginal, the indexes in the slotidx and additional annotation for each set in the slotanno.Objects of class> slotNames(gs.annots$c2)[1] "original"   "idx"       "anno"        "featureIDs" "species"[6] "name"       "label"     "version"     "date"                                            buildCustomIdx,buildGMTIdx,buildKEGGIdx,buildMSigDBIdx andbuildGeneSetDBIdx can be also used to build gene set collection indexes. The functionsbuildCustomIdx andbuildGMTIdx were written to allow users to run EGSEA on gene set collections that may have been curated within a lab or downloaded from public databases and allow use of gene identifiers other than Entrez IDs. Example databases include, ENCODE Gene Set Hub (available fromhttps://sourceforge.net/projects/encodegenesethub/), which is a growing resource of gene sets derived from high quality ENCODE profiling experiments encompassing hundreds of DNase hypersensitivity, histone modification and transcription factor binding experiments30. Other resources include PathwayCommons (http://www.pathwaycommons.org/)31 and theKEGGREST32 package that provides access to up-to-date KEGG pathways across many species.Other EGSEA functions such asgenes data.frame of thevoom object as follows:Before an EGSEA test is carried out, a few parameters need to be specified. First, a mapping between Entrez IDs and Gene Symbols is created for use by the visualization procedures. This mapping can be extracted from the> colnames(v$genes)[1] "ENTREZID" "SYMBOL"    "CHR"> symbolsMap = v$genes> colnames(symbolsMap) = c> symbolsMap = as.character                                            baseMethods in the code below), which determines the individual algorithms that are used in the ensemble testing. The supported base methods can be listed using the functionegsea.base as follows:Another important parameter in EGSEA is the list of base GSE methods , which can be listed as follows:Since each base method generates different> egsea.combine[1] "fisher"    "wilkinson" "average"  "logitp"    "sump"      "sumz"[7] "votep"     "median"                                            Finally, the sorting of EGSEA results plays an essential role in identifying relevant gene sets. Any of EGSEA’s combined scores or the rankings from individual base methods can be used for sorting the results.> egsea.sort [1] "p.value"       "p.adj"         "vote.rank"   "avg.rank"       "med.rank" [6] "min.pvalue"    "min.rank"      "avg.logfc"   "avg.logfc.dir"  "direction"[11] "significance"  "camera"        "roast"       "safe"           "gage"[16] "padog"         "plage"         "zscore"      "gsva"           "ssgsea"[21] "globaltest"    "ora"           "fry"                                            p.adj is the default option for sorting EGSEA results for convenience, we recommend the use of eithermed.rank orvote.rank because they efficiently utilize the rankings of individual methods and tend to produce fewer false positives5.Althoughegsea function that takes avoom object, a contrasts matrix, collections of gene sets and other run parameters as follows:Next, the EGSEA analysis is performed using the> gsa = egseaEGSEA analysis has started##------ Fri Jun 16 09:49:11 2017 ------##Log fold changes are estimated using limma package ...limma DE analysis is carried out ...Number of used cores has changed to 3in order to avoid CPU overloading.EGSEA is running on the provided data and c2 collectionEGSEA is running on the provided data and c5BP collectionEGSEA is running on the provided data and c5CC collectionEGSEA is running on the provided data and c5MF collectionEGSEA is running on the provided data and kegg collection##------ Fri Jun 16 09:57:56 2017 ------##EGSEA analysis took 525.812 seconds.EGSEA analysis has completed                                            contrasts argument. If this parameter isNULL, all pairwise comparisons based onv$targets$group are created, assuming thatgroup is the primary factor in the design matrix. Likewise, all the coefficients of the primary factor are used if the design matrix has an intercept.In situations where the design matrix includes an intercept, a vector of integers that specify the columns of the design matrix to test using EGSEA can be passed to theEGSEA is implemented with parallel computing features enabled using theparallel package33 at both the method-level and experimental contrast-level. The running time of the EGSEA test depends on the base methods selected and whether report generation is enabled or not. The latter significantly increases the run time, particularly if the argumentdisplay.top is assigned a large value (> 20) and/or a large number of gene set collections are selected. EGSEA reporting functionality generates set-level plots for the top gene sets as well as collection-level plots.EGSEA package also has a function namedegsea.cnt, that can perform the EGSEA test using an RNA-seq count matrix rather than avoom object, a function namedegsea.ora, that can perform over-representation analysis with EGSEA reporting capabilities using only a vector of gene IDs, and theegsea.ma function that can perform EGSEA testing using a microarray expression matrix as shown later in the workflow.TheClasses used to manage the results. The output of the functionsegsea,egsea.cnt,egsea.ora andegsea.ma is an S4 object of classEGSEAResults. Several S4 methods can be invoked to query this object. For example, an overview of the EGSEA analysis can be displayed using theshow method as follows:> show(gsa)An object of class "EGSEAResults"Total number of genes: 14165Total number of samples: 9Contrasts: BasalvsLP, BasalvsML, LPvsMLBase GSE methods: camera (limma:3.32.2), safe (safe:3.16.0), gage (gage:2.26.0), padog (PADOG:1.18.0), plage (GSVA:1.24.1), zscore (GSVA:1.24.1), gsva (GSVA:1.24.1), ssgsea (GSVA:1.24.1),P-values combining method: wilkinsonSorting statistic: med.rankOrganism: Mus musculusHTML report generated: NoTested gene set collections:c2 Curated Gene Sets (c2): 4726 gene sets - Version: 5.2, Update date: 07 March 2017c5 GO Gene Sets (BP) (c5BP): 4653 gene sets - Version: 5.2, Update date: 07 March 2017c5 GO Gene Sets (CC) (c5CC): 584 gene sets - Version: 5.2, Update date: 07 March 2017c5 GO Gene Sets (MF) (c5MF): 928 gene sets - Version: 5.2, Update date: 07 March 2017KEGG Pathways (kegg): 287 gene sets - Version: NA, Update date: 07 March 2017EGSEA version: 1.5.2EGSEAdata version: 1.4.0Use summary(object) and topSets to explore this object.                                            p-values derived from different GSE algorithms, the sorting statistic used and the size of each gene set collection. Note that the gene set collections are identified using the labels that appear in parentheses (e.g.c2) in the output ofshow.This command displays the number of genes and samples that were included in the analysis, the experimental contrasts, base GSE methods, the method used to combine theGetting top ranked gene sets. A summary of the top 10 gene sets in each collection for each contrast in addition to the EGSEA comparative analysis can be displayed using the S4 methodsummary as follows:> summary(gsa)**** Top 10 gene sets in the c2 Curated Gene Sets collection ****** Contrast BasalvsLP **LIM_MAMMARY_STEM_CELL_DN | LIM_MAMMARY_LUMINAL_PROGENITOR_UPMONTERO_THYROID_CANCER_POOR_SURVIVAL_UP | SMID_BREAST_CANCER_LUMINAL_A_DNNAKAYAMA_SOFT_TISSUE_TUMORS_PCA2_UP | REACTOME_LATENT_INFECTION_OF_HOMO_SAPIENS...REACTOME_TRANSFERRIN_ENDOCYTOSIS_AND_RECYCLING | FARMER_BREAST_CANCER_CLUSTER_2KEGG_EPITHELIAL_CELL_SIGNALING_... | LANDIS_BREAST_CANCER_PROGRESSION_UP                        ** Contrast BasalvsML **LIM_MAMMARY_STEM_CELL_DN | LIM_MAMMARY_STEM_CELL_UPLIM_MAMMARY_LUMINAL_MATURE_DN | PAPASPYRIDONOS_UNSTABLE_ATEROSCLEROTIC_PLAQUE_DNNAKAYAMA_SOFT_TISSUE_TUMORS_PCA2_UP | LIM_MAMMARY_LUMINAL_MATURE_UPCHARAFE_BREAST_CANCER_LUMINAL_VS_MESENCHYMAL_UP | RICKMAN_HEAD_AND_NECK_CANCER_AYAGUE_PRETUMOR_DRUG_RESISTANCE_DN | BERTUCCI_MEDULLARY_VS_DUCTAL_BREAST_CANCER_DN                        ** Contrast LPvsML **LIM_MAMMARY_LUMINAL_MATURE_UP | LIM_MAMMARY_LUMINAL_MATURE_DNPHONG_TNF_RESPONSE_VIA_P38_PARTIAL | WOTTON_RUNX_TARGETS_UPWANG_MLL_TARGETS | PHONG_TNF_TARGETS_DNREACTOME_PEPTIDE_LIGAND_BINDING_RECEPTORS | CHIANG_LIVER_CANCER_SUBCLASS_CTNNB1_DNGERHOLD_RESPONSE_TO_TZD_DN | DURAND_STROMA_S_UP                        ** Comparison analysis **LIM_MAMMARY_LUMINAL_MATURE_DN | LIM_MAMMARY_STEM_CELL_DNNAKAYAMA_SOFT_TISSUE_TUMORS_PCA2_UP | LIM_MAMMARY_LUMINAL_MATURE_UPCOLDREN_GEFITINIB_RESISTANCE_DN | LIM_MAMMARY_STEM_CELL_UPCHARAFE_BREAST_CANCER_LUMINAL_VS_MESENCHYMAL_UP | LIM_MAMMARY_LUMINAL_PROGENITOR_UPBERTUCCI_MEDULLARY_VS_DUCTAL_BREAST_CANCER_DN | MIKKELSEN_IPS_WITH_HCP_H3K27ME3                        **** Top 10 gene sets in the c5 GO Gene Sets (BP) collection ****** Contrast BasalvsLP **GO_SYNAPSE_ORGANIZATION | GO_IRON_ION_TRANSPORTGO_CALCIUM_INDEPENDENT_CELL_CELL_ADHESION_VIA_PLASMA_MEMBRANE_CELL_ADHESION_MOLECULES | GO_PH_REDUCTIONGO_HOMOPHILIC_CELL_ADHESION_VIA_PLASMA_MEMBRANE_ADHESION_MOLECULES | GO_VACUOLAR_ACIDIFICATIONGO_FERRIC_IRON_TRANSPORT | GO_TRIVALENT_INORGANIC_CATION_TRANSPORTGO_NEURON_PROJECTION_GUIDANCE | GO_MESONEPHROS_DEVELOPMENT                        ** Contrast BasalvsML **GO_FERRIC_IRON_TRANSPORT | GO_TRIVALENT_INORGANIC_CATION_TRANSPORTGO_IRON_ION_TRANSPORT | GO_NEURON_PROJECTION_GUIDANCEGO_GLIAL_CELL_MIGRATION | GO_SPINAL_CORD_DEVELOPMENTGO_REGULATION_OF_SYNAPSE_ORGANIZATION | GO_ACTION_POTENTIALGO_MESONEPHROS_DEVELOPMENT | GO_NEGATIVE_REGULATION_OF_SMOOTH_MUSCLE_CELL_MIGRATION                        ** Contrast LPvsML **GO_NEGATIVE_REGULATION_OF_NECROTIC_CELL_DEATH | GO_PARTURITIONGO_RESPONSE_TO_VITAMIN_D | GO_GPI_ANCHOR_METABOLIC_PROCESSGO_REGULATION_OF_BLOOD_PRESSURE | GO_DETECTION_OF_MOLECULE_OF_BACTERIAL_ORIGINGO_CELL_SUBSTRATE_ADHESION | GO_PROTEIN_TRANSPORT_ALONG_MICROTUBULEGO_INTRACILIARY_TRANSPORT | GO_CELLULAR_RESPONSE_TO_VITAMIN                        ** Comparison analysis **GO_IRON_ION_TRANSPORT | GO_FERRIC_IRON_TRANSPORTGO_TRIVALENT_INORGANIC_CATION_TRANSPORT | GO_NEURON_PROJECTION_GUIDANCEGO_MESONEPHROS_DEVELOPMENT | GO_SYNAPSE_ORGANIZATIONGO_REGULATION_OF_SYNAPSE_ORGANIZATION | GO_MEMBRANE_DEPOLARIZATION_DURING_CARDIAC_MUSCLE_CELL_ACTION_POTENTIALGO_HOMOPHILIC_CELL_ADHESION_VIA_PLASMA_MEMBRANE_ADHESION_MOLECULES | GO_NEGATIVE_REGULATION_OF_SMOOTH_MUSCLE_CELL_MIGRATION                        **** Top 10 gene sets in the c5 GO Gene Sets (CC) collection ****** Contrast BasalvsLP **GO_PROTON_TRANSPORTING_V_TYPE_ATPASE_COMPLEX | GO_VACUOLAR_PROTON_TRANSPORTING_V_TYPE_ATPASE_COMPLEXGO_MICROTUBULE_END | GO_MICROTUBULE_PLUS_ENDGO_ACTIN_FILAMENT_BUNDLE | GO_CELL_CELL_ADHERENS_JUNCTIONGO_NEUROMUSCULAR_JUNCTION | GO_AP_TYPE_MEMBRANE_COAT_ADAPTOR_COMPLEXGO_INTERMEDIATE_FILAMENT | GO_CONDENSED_NUCLEAR_CHROMOSOME_CENTROMERIC_REGION                        ** Contrast BasalvsML **GO_FILOPODIUM_MEMBRANE | GO_LATE_ENDOSOME_MEMBRANEGO_PROTON_TRANSPORTING_V_TYPE_ATPASE_COMPLEX | GO_NEUROMUSCULAR_JUNCTIONGO_COATED_MEMBRANE | GO_ACTIN_FILAMENT_BUNDLEGO_CLATHRIN_COAT | GO_AP_TYPE_MEMBRANE_COAT_ADAPTOR_COMPLEXGO_CLATHRIN_ADAPTOR_COMPLEX | GO_CONTRACTILE_FIBER                        ** Contrast LPvsML **GO_CILIARY_TRANSITION_ZONE | GO_TCTN_B9D_COMPLEXGO_NUCLEAR_NUCLEOSOME | GO_INTRINSIC_COMPONENT_OF_ORGANELLE_MEMBRANEGO_ENDOPLASMIC_RETICULUM_QUALITY_CONTROL_COMPARTMENT | GO_KERATIN_FILAMENTGO_PROTEASOME_COMPLEX | GO_CILIARY_BASAL_BODYGO_PROTEASOME_CORE_COMPLEX | GO_CORNIFIED_ENVELOPE                        ** Comparison analysis **GO_PROTON_TRANSPORTING_V_TYPE_ATPASE_COMPLEX | GO_ACTIN_FILAMENT_BUNDLEGO_NEUROMUSCULAR_JUNCTION | GO_AP_TYPE_MEMBRANE_COAT_ADAPTOR_COMPLEXGO_CONTRACTILE_FIBER | GO_INTERMEDIATE_FILAMENTGO_LATE_ENDOSOME_MEMBRANE | GO_CLATHRIN_VESICLE_COATGO_ENDOPLASMIC_RETICULUM_QUALITY_CONTROL_COMPARTMENT | GO_MICROTUBULE_END                        **** Top 10 gene sets in the c5 GO Gene Sets (MF) collection ****** Contrast BasalvsLP **GO_HYDROGEN_EXPORTING_ATPASE_ACTIVITY | GO_SIGNALING_PATTERN_RECOGNITION_RECEPTOR_ACTIVITYGO_LIPID_TRANSPORTER_ACTIVITY | GO_TRIGLYCERIDE_LIPASE_ACTIVITYGO_AMINE_BINDING | GO_STRUCTURAL_CONSTITUENT_OF_MUSCLEGO_NEUROPEPTIDE_RECEPTOR_ACTIVITY | GO_WIDE_PORE_CHANNEL_ACTIVITYGO_CATION_TRANSPORTING_ATPASE_ACTIVITY | GO_LIPASE_ACTIVITY                        ** Contrast BasalvsML **GO_G_PROTEIN_COUPLED_RECEPTOR_ACTIVITY | GO_TRANSMEMBRANE_RECEPTOR_PROTEIN_KINASE_ACTIVITYGO_STRUCTURAL_CONSTITUENT_OF_MUSCLE | GO_VOLTAGE_GATED_SODIUM_CHANNEL_ACTIVITYGO_CORECEPTOR_ACTIVITY | GO_TRANSMEMBRANE_RECEPTOR_PROTEIN_TYROSINE_KINASE_ACTIVITYGO_LIPID_TRANSPORTER_ACTIVITY | GO_SULFOTRANSFERASE_ACTIVITYGO_CATION_TRANSPORTING_ATPASE_ACTIVITY | GO_PEPTIDE_RECEPTOR_ACTIVITY                        ** Contrast LPvsML **GO_MANNOSE_BINDING | GO_PHOSPHORIC_DIESTER_HYDROLASE_ACTIVITYGO_BETA_1_3_GALACTOSYLTRANSFERASE_ACTIVITY | GO_COMPLEMENT_BINDINGGO_ALDEHYDE_DEHYDROGENASE_NAD_ACTIVITY | GO_MANNOSIDASE_ACTIVITYGO_LIGASE_ACTIVITY_FORMING_CARBON_NITROGEN_BONDS | GO_CARBOHYDRATE_PHOSPHATASE_ACTIVITYGO_LIPASE_ACTIVITY | GO_PEPTIDE_RECEPTOR_ACTIVITY                        ** Comparison analysis **GO_STRUCTURAL_CONSTITUENT_OF_MUSCLE | GO_LIPID_TRANSPORTER_ACTIVITYGO_CATION_TRANSPORTING_ATPASE_ACTIVITY | GO_CHEMOREPELLENT_ACTIVITYGO_HEPARAN_SULFATE_PROTEOGLYCAN_BINDING | GO_TRANSMEMBRANE_RECEPTOR_PROTEIN_TYROSINE_KINASE_ACTIVITYGO_LIPASE_ACTIVITY | GO_PEPTIDE_RECEPTOR_ACTIVITYGO_CORECEPTOR_ACTIVITY | GO_TRANSMEMBRANE_RECEPTOR_PROTEIN_KINASE_ACTIVITY                        **** Top 10 gene sets in the KEGG Pathways collection ****** Contrast BasalvsLP **Collecting duct acid secretion | alpha-Linolenic acid metabolismSynaptic vesicle cycle | Hepatitis CVascular smooth muscle contraction | Rheumatoid arthritiscGMP-PKG signaling pathway | Axon guidanceProgesterone-mediated oocyte maturation | Arrhythmogenic right ventricular cardiomyopathy (ARVC)                        ** Contrast BasalvsML **Collecting duct acid secretion | Synaptic vesicle cycleOther glycan degradation | Axon guidanceArrhythmogenic right ventricular cardiomyopathy (ARVC) | Glycerophospholipid metabolismLysosome | Vascular smooth muscle contractionProtein digestion and absorption | Oxytocin signaling pathway                        ** Contrast LPvsML **Glycosylphosphatidylinositol(GPI)-anchor biosynthesis | Histidine metabolismDrug metabolism - cytochrome P450 | PI3K-Akt signaling pathwayProteasome | Sulfur metabolismRenin-angiotensin system | Nitrogen metabolismTyrosine metabolism | Systemic lupus erythematosus                        ** Comparison analysis **Collecting duct acid secretion | Synaptic vesicle cycleVascular smooth muscle contraction | Axon guidanceArrhythmogenic right ventricular cardiomyopathy (ARVC) | Oxytocin signaling pathwayLysosome | Adrenergic signaling in cardiomyocytesLinoleic acid metabolism | cGMP-PKG signaling pathway                                            comparative analysis allows researchers to estimate the significance of a gene set across multiple experimental contrasts. This analysis helps in the identification of biological processes that are perturbed in multiple experimental conditions simultaneously. This experiment is the RNA-seq equivalent of Limet al. (2010)22, who used Illumina microarrays to study the same cell populations (see later), so it is reassuring to observe theLIM gene signatures derived from this experiment amongst the top ranked c2 gene signatures in both the individual contrasts and comparative results.EGSEA’sN sets in each collection and contrast using the methodtopSets. For example, the top 10 gene sets in the c2 collection for the comparative analysis can be retrieved as follows:Another way of exploring the EGSEA results is to retrieve the top ranked> topSets                        Extracting the top gene sets of the collection                        c2 Curated Gene Sets for the contrast comparison                         Sorted by med.rank                         [1] "LIM_MAMMARY_LUMINAL_MATURE_DN"                         [2] "LIM_MAMMARY_STEM_CELL_DN"                         [3] "NAKAYAMA_SOFT_TISSUE_TUMORS_PCA2_UP"                         [4] "LIM_MAMMARY_LUMINAL_MATURE_UP"                         [5] "COLDREN_GEFITINIB_RESISTANCE_DN"                         [6] "LIM_MAMMARY_STEM_CELL_UP"                         [7] "CHARAFE_BREAST_CANCER_LUMINAL_VS_MESENCHYMAL_UP"                         [8] "LIM_MAMMARY_LUMINAL_PROGENITOR_UP"                         [9] "BERTUCCI_MEDULLARY_VS_DUCTAL_BREAST_CANCER_DN"                        [10] "MIKKELSEN_IPS_WITH_HCP_H3K27ME3"                                            med.rank as selected whenegsea was invoked above. When the argumentnames.only is set toFALSE, additional information is displayed for each gene set including gene set annotation, the EGSEA scores and the individual rankings by each base method. As expected, gene sets retrieved by EGSEA included theLIM gene sets22 that were derived from microarray profiles of analagous mammary cell populations  as well as those derived from populations with similar origin (sets 7 and 9) and behaviour or characteristics (sets 5 and 10).The gene sets are ordered based on theirtopSets can be used to search for gene sets of interest based on different EGSEA scores as well as the rankings of individual methods. For example, the ranking of the sixLIM gene sets from the c2 collection can be displayed based on themed.rank as follows:Next,> t = topSets> t                                          p.adj Rank med.rank vote.rankLIM_MAMMARY_LUMINAL_MATURE_DN      1.646053e-29    1       36         5LIM_MAMMARY_STEM_CELL_DN           6.082053e-43    2       37         5LIM_MAMMARY_LUMINAL_MATURE_UP      2.469061e-22    4       92         5LIM_MAMMARY_STEM_CELL_UP          3.154132e-103    6      134         5LIM_MAMMARY_LUMINAL_PROGENITOR_UP  3.871536e-30    8      180         5LIM_MAMMARY_LUMINAL_PROGENITOR_DN  2.033005e-06  178      636       115                                            LIM gene sets are ranked in the top 10 by EGSEA, the values shown in the median rank (med.rank) column indicate that individual methods can assign much lower ranks to these sets. EGSEA’s prioritisation of these gene sets demonstrates the benefit of an ensemble approach.While five of theSimilarly, we can find the top 10 pathways in the KEGG collection from the ensemble analysis for the Basal versus LP contrast and the comparative analysis as follows:> topSets                        Extracting the top gene sets of the collection                        KEGG Pathways for the contrast BasalvsLP                         Sorted by med.rank                         [1] "Collecting duct acid secretion"            "alpha-Linolenic acid metabolism"                         [3] "Synaptic vesicle cycle"                    "Hepatitis C"                         [5] "Vascular smooth muscle contraction"        "Rheumatoid arthritis"                         [7] "cGMP-PKG signaling pathway"                "Axon guidance"                         [9] "Progesterone-mediated oocyte maturation"   "Arrhythmogenic right ventricular cardiomyopathy (ARVC)"                         > topSets                        Extracting the top gene sets of the collection                        KEGG Pathways for the contrast comparison                         Sorted by med.rank                         [1] "Collecting duct acid secretion"            "Synaptic vesicle cycle"                         [3] "Vascular smooth muscle contraction"        "Axon guidance"                         [5] "Arrhythmogenic right ventricular cardiomyopathy (ARVC)"  "Oxytocin signaling pathway"                         [7] "Lysosome"                                  "Adrenergic signaling in cardiomyocytes"                         [9] "Linoleic acid metabolism"                  "cGMP-PKG signaling pathway"                                            Vascular smooth muscle contraction andOxytocin signalling pathway) and milk production and secretion from luminal lineage cells .EGSEA highlights many pathways with known importance in the mammary gland such as those associated with distinct roles in lactation like basal cell contraction Generating heatmap for LIM_MAMMARY_STEM_CELL_UP from the collectionc2 Curated Gene Sets and for the contrast comparison> plotHeatmapGenerating heatmap for LIM_MAMMARY_STEM_CELL_DN from the collectionc2 Curated Gene Sets and for the contrast comparison                                            plotHeatmap, thegene.set value must match the name returned from thetopSets method. The rows of the heatmap represent the genes in the set and the columns represent the experimental contrasts. The heatmap colour-scale ranges from down-regulated (blue) to up-regulated (red) while the row labels (Gene symbols) are coloured in green when the genes are statistically significant in the DE analysis (i.e. FDR≤ 0.05 in at least one contrast). Heatmaps can be generated for individual comparisons by changing thecontrast argument ofplotHeatmap. TheplotHeatmap method also generates a CSV file that includes the DE analysis results fromlimma::topTable for all expressed genes in the selected gene set and for each contrast (in the case ofcontrast = "comparison"). This file can be used to create customised plots using other R/Bioconductor packages.When usingplotPathway method which uses functionality from thepathview package36. For example, the third KEGG signalling pathway retrieved for the contrastBasalvsLP isVascular smooth muscle contraction and can be visualized as follows:In addition to heatmaps, pathway maps can be generated for the KEGG gene sets using the> plotPathwayGenerating pathway map for Vascular smooth muscle contraction from the collectionKEGG Pathways and for the contrast BasalvsLP                                            limma DE analysis Generating pathway map for Vascular smooth muscle contraction from the collectionKEGG Pathways and for the contrast comparison                                            The comparative pathway map shows the log-fold-changes for each gene in each contrast by dividing the gene nodes on the map into multiple columns, one for each contrast .Visualizing results at the experiment level. SinceEGSEA combines the results from multiple gene set testing methods, it can be interesting to compare how different base methods rank a given gene set collection for a selected contrast. TheplotMethods command generates a multi-dimensional scaling (MDS) plot for the ranking of gene sets across all the base methods used (self-contained versuscompetitive).ds used . Methods> plotMethodsGenerating MDS plot for the collectionc2 Curated Gene Sets and for the contrast BasalvsLP> plotMethodsGenerating MDS plot for the collectionc5BP GO Gene Sets and for the contrast BasalvsLP                                            plotSummary method.The significance of each gene set in a given collection for a selected contrast can be visualized using EGSEA’s> plotSummaryGenerating Summary plots for the collectionKEGG Pathways and for the contrast LPvsML                                            10  (X-axis) and the average absolute log fold-change of the set genes (Y-axis). The sets that appear towards the top-right corner of this plot are most likely to be biologically relevant. EGSEA generates two types of summary plots: the directional summary plot (sort.by argument). The bubble size is based on the EGSEAsignificance score in the former plot and the gene set size in the latter. For example, the summary plots of the KEGG pathways for the LP vs ML contrast show few significant pathways Generating Summary plots for the collectionc2 Curated Gene Sets and for the contrast LPvsML                                            x.cutoff can be used to focus in on the significant gene sets rather than plotting the entire gene set collection, for example Generating Summary plots for the collectionc2 Curated Gene Sets and for the contrast LPvsML                                            plotSummary method as follows:Comparative summary plots can be also generated to compare the significance of gene sets between two contrasts, for example, the comparison between Basal vs LP and Basal vs ML  shows th> plotSummary,+         file.name = "summary_kegg_1vs2")Generating Summary plots for the collectionKEGG Pathways and for the comparison BasalvsLP vs BasalvsML                                            plotSummary method has two useful parameters: (i)use.names that can be used to display gene set names instead of gene set IDs and (ii)interactive that can be used to generate an interactive version of this plot.TheEGSEA utilizes functionality from thetopGO package37 to generate GO graphs for the significant biological processes (BPs), cellular compartments (CCs) and molecular functions (MFs). TheplotGOGraph method can generate such a display (The c5 collection of MSigDB and the Gene Ontology collection of GeneSetDB contain Gene Ontology (GO) terms. These collections are meant to be non-redundant, containing only a small subset of the entire GO and visualizing how these terms are related to each other can be informative.display  as follo> plotGOGraphGenerating GO Graphs for the collection c5 GO Gene Sets (BP) and for the contrast BasalvsLP based on the med.rank> plotGOGraphGenerating GO Graphs for the collection c5 GO Gene Sets (CC) and for the contrast BasalvsLP based on the med.rank                                            sort.by, which in this instance was taken asmed.rank by default since this was selected when EGSEA was invoked. The top five most significant GO terms are highlighted by default in each GO category . More terms can be displayed by changing the value of the parameternoSig. However, this might generate very complicated and unresolved graphs. The colour of the nodes varies between red (most significant) and yellow (least significant). The values of thesort.by scoring function are scaled between 0 and 1 to generate these graphs.The GO graphs are coloured based on the values of the argumentbar plot. The methodplotBars can be used to generate a bar plot for the topN gene sets in an individual collection for a particular contrast or from a comparative analysis across multiple contrasts. For example, the top 20 gene sets of the comparative analysis carried out on the c2 collection of MSigDB can be visualized in abar plot Generating a bar plot for the collection c2 Curated Gene Sets and the contrast comparison                                            10(p.ad j) values are plotted for the top 20 gene sets selected and ordered based on thesort.by parameter. The parametersbar.vals,number andsort.by ofplotBars can be changed to customize thebar plot.The colour of the bars is based on the regulation direction of the gene sets, i.e., red for up-regulated, blue for down-regulated and purple for neutral regulation . By default, the − logsummary heatmap can be a useful visualization. The methodplotSummaryHeatmaps generates a heatmap of the topN gene sets in the comparative analysis across all experimental conditions Generating summary heatmap for the collection c2 Curated Gene Setssort.by: med.rank, hm.vals: avg.logfc.dir, show.vals:> plotSummaryHeatmapGenerating summary heatmap for the collection KEGG Pathwayssort.by: med.rank, hm.vals: avg.logfc.dir, show.vals:                                            EGSEAResults object using thelimmaTopTable method.We find the heatmap view at both the gene set and summary level and the summary level bar plots to be useful summaries to include in publications to highlight the gene set testing results. The top differentially expressed genes from each contrast can be accessed from the> t = limmaTopTable> head(t)       ENTREZID   SYMBOL CHR logFC AveExpr     t  P.Value adj.P.Val    B19253     19253   Ptpn18   1 -5.63    4.13 -34.5 5.87e-10  9.62e-07 13.216324     16324    Inhbb   1 -4.79    6.46 -33.2 7.99e-10  9.62e-07 13.353624     53624    Cldn7  11 -5.51    6.30 -40.2 1.75e-10  9.62e-07 14.5218518   218518 Marveld2  13 -5.14    4.93 -34.8 5.56e-10  9.62e-07 13.512759     12759      Clu  14 -5.44    8.86 -41.0 1.52e-10  9.62e-07 14.770350     70350    Basp1  15 -6.07    5.25 -34.3 6.22e-10  9.62e-07 13.3                                            Creating an HTML report of the results. To generate an EGSEA HTML report for this dataset, you can either setreport=TRUE when you invokeegsea or use the S4 methodgenerateReport as follows:> generateReportEGSEA HTML report is being generated ...                                            http://bioinf.wehi.edu.au/EGSEA/mam-rnaseq-egsea-report/index.html (DT package (https://CRAN.R-project.org/package=DT) and summary plots fromplotly (https://CRAN.R-project.org/package=plotly) are integrated into the report usinghtmlwidgets (https://CRAN.R-project.org/package=htmlwidgets) and can be added by settinginteractive = TRUE in the command above. This option significantly increases both the run time and size of the final report due to the large number of gene sets in most collections.The EGSEA report generated for this dataset is available online atex.html . The HTMThis example completes our overview of EGSEA’s gene set testing and plotting capabilities for RNA-seq data. Readers can refer to the EGSEA vignette or individual help pages for further details on each of the above methods and classes.et al. (2010)22 and is the microarray equivalent of the RNA-seq data analysed above. Support for microarray data is a new feature in EGSEA, and in this example, we show an express route for analysis according to the steps shown inThe second dataset analysed in this workflow comes from Limhttp://bioinf.wehi.edu.au/EGSEA/arraydata.zip into the current working directory. Illumina BeadArray data can be read in directly using thereadIDAT andreadBGX functions from theilluminaio package38. However, a more convenient way is via theread.idat function inlimma which uses theseilluminaio functions and outputs the data as anEListRaw object for further processing.To analyse this dataset, we begin by unzipping the files downloaded from> library(limma)> targets = read.delim> data = read.idat(as.character(targets$File),+                   bgxfile="GPL6887_MouseWG-6_V2_0_R0_11278593_A.bgx",+                   annotation=c)Reading manifest file GPL6887_MouseWG-6_V2_0_R0_11278593_A.bgx ... Done 4481850214_B_Grn.idat ... Done 4481850214_C_Grn.idat ... Done 4481850214_D_Grn.idat ... Done 4481850214_F_Grn.idat ... Done 4481850187_A_Grn.idat ... Done 4481850187_B_Grn.idat ... Done 4481850187_D_Grn.idat ... Done 4481850187_E_Grn.idat ... Done 4481850187_F_Grn.idat ... Done 4466975058_A_Grn.idat ... Done 4466975058_B_Grn.idat ... Done 4466975058_C_Grn.idat ... Done 4466975058_D_Grn.idat ... Done 4466975058_E_Grn.idat ... Done 4466975058_F_Grn.idat ... DoneFinished reading data.> data$other$Detection = detectionPValues(data)> data$targets = targets> colnames(data) = targets$Sample                                    neqc function inlimma is used to carry outnormexp background correction and quantile normalisation on the raw intensity values using negative control probes39. This is followed by log2-transformation of the normalised intensity values and removal of the control probes.Next the> data = neqc(data)                                    p-value of less than 0.05 in at least 5 samples (the number of samples within each group). We next remove genes without a valid Entrez ID and in cases where there are multiple probes targeting different isoforms of the same gene, select the probe with highest average expression as the representative one to use in the EGSEA analysis. This leaves 7,123 probes for further analysis.We then filter out probes that are consistently non-expressed or lowly expressed throughout all samples as they are uninformative in downstream analysis. Our threshold for expression requires probes to have a detection> table(targets$Celltype)Basal    LP    ML    5     5     5> keep.exprs = rowSums(data$other$Detection<0.05)>=5> table(keep.exprs)keep.exprsFALSE  TRUE23638 21643> data = data> dim(data)[1] 21643    15> head(data$genes)      Probe_Id Array_Address_Id Entrez_Gene_ID        Symbol Chromosome3 ILMN_1219601          2030280           <NA> C920011N12Rik4 ILMN_1252621          1980164         101142 2700050P07Rik          66 ILMN_3162407          6220026           <NA>         Zfp367 ILMN_2514723          2030072           <NA> 1110067B18Rik8 ILMN_2692952          6040743         329831 4833436C18Rik          49 ILMN_1257952          7160091           <NA> B930060K05Rik> sum(is.na(data$genes$Entrez_Gene_ID))[1] 11535> data1 = data> dim(data1)[1] 10108    15> ord = order(lmFit(data1)$Amean, decreasing=TRUE)> ids2keep = data1$genes$Array_Address_Id[ord][!duplicated(data1$genes$Entrez_Gene_ID[ord])]> data1 = data1> dim(data1)[1] 7123   15> expr = data1$E> group = as.factor(data1$targets$Celltype)> probe.annot = data1$genes> head(probe.annot)> head(probe.annot)      Array_Address_Id Entrez_Gene_ID   Symbol39513          4120224          20102    Rps4x9062           2260576          22143   Tuba1b15308          5720202          12192  Zfp36l139894          1470600          11947    Atp5b24709          2710477          20088    Rps249872           1580471         228033   Atp5g3                                    29 and contrasts matrix to look for differences between the Basal and LP, Basal and ML and LP and ML populations. A batch term is included in the linear model to account for differences in expression that are attributable to the day the experiment was run.As before, we need to set up an appropriate linear model> head(data1$targets)                     File Sample Celltype Time Experiment2-2 4481850214_B_Grn.idat    2-2       ML  At1          13-3 4481850214_C_Grn.idat    3-3       LP  At1          14-4 4481850214_D_Grn.idat    4-4    Basal  At1          16-7 4481850214_F_Grn.idat    6-7       ML  At2          17-8 4481850187_A_Grn.idat    7-8       LP  At2          18-9 4481850187_B_Grn.idat    8-9    Basal  At2          1> experiment = as.character(data1$targets$Experiment)> design = model.matrix(~0 + group + experiment)> colnames(design) = gsub)> design   Basal LP ML experiment21      0  0  1           02      0  1  0           03      1  0  0           04      0  0  1           05      0  1  0           06      1  0  0           07      0  0  1           08      0  1  0           09      1  0  0           010     0  0  1           111     0  1  0           112     1  0  0           113     1  0  0           114     0  0  1           115     0  1  0           1attr[1] 1 1 1 2attrattr$group[1] "contr.treatment"                    attr$experiment[1] "contr.treatment"                    > contr.matrix = makeContrasts)> contr.matrix             ContrastsLevels        BasalvsLP BasalvsML LPvsML  Basal               1         1      0  LP                 -1         0      1  ML                  0        -1     -1  experiment2         0         0      0                                    EGSEAdata package and build indexes based on Entrez IDs that link between the genes in each signature and the rows of our expression matrix.We next extract the mouse c2, c5 and KEGG gene signature collections from the> library(EGSEA)> library(EGSEAdata)> gs.annots = buildIdx, go.part = TRUE)[1] "Loading MSigDB Gene Sets ... "[1] "Loaded gene sets for the collection c2 ..."[1] "Indexed the collection c2 ..."[1] "Created annotation for the collection c2 ..."[1] "Loaded gene sets for the collection c5 ..."[1] "Indexed the collection c5 ..."[1] "Created annotation for the collection c5 ..."MSigDB c5 gene set collection has been partitioned intoc5BP, c5CC, c5MF[1] "Building KEGG pathways annotation object ... "> names(gs.annots)[1] "c2"   "c5BP" "c5CC" "c5MF" "kegg"                                    egsea.ma. Gene sets were again prioritised by their median rank across the 11 methods.The same 11 base methods used previously in the RNA-seq analysis were selected for the ensemble testing of the microarray data using the function> baseMethods = egsea.base[-2]> baseMethods [1] "camera"     "safe"       "gage"       "padog"       "plage"       "zscore" [7] "gsva"       "ssgsea"     "globaltest" "ora"         "fry">> gsam = egsea.maEGSEA analysis has started##------ Tue Jun 20 14:27:32 2017 ------##Log fold changes are estimated using limma package ...limma DE analysis is carried out ...Number of used cores has changed to 3in order to avoid CPU overloading.EGSEA is running on the provided data and c2 collectionEGSEA is running on the provided data and c5BP collectionEGSEA is running on the provided data and c5CC collectionEGSEA is running on the provided data and c5MF collectionEGSEA is running on the provided data and kegg collection##------ Tue Jun 20 14:33:37 2017 ------##EGSEA analysis took 365.359 seconds.EGSEA analysis has completed                                    generateReport function. We complete our analysis by displaying the top ranked sets for the c2 collection from a comparative analysis across all contrasts.An HTML report that includes each of the gene set level and summary level plots shown individually for the RNA-seq analysis was then created using the> generateReportEGSEA HTML report is being generated ...> topSets Sorted by med.rank [1] "LIM_MAMMARY_STEM_CELL_UP" [2] "LIM_MAMMARY_LUMINAL_MATURE_DN" [3] "LIM_MAMMARY_STEM_CELL_DN" [4] "CHARAFE_BREAST_CANCER_LUMINAL_VS_MESENCHYMAL_DN" [5] "LIU_PROSTATE_CANCER_DN"                                    http://bioinf.wehi.edu.au/EGSEA/mam-ma-egsea-report/index.html. Reanalysis of this data retrieves similar c2 gene sets to those identified by analysis of RNA-seq data. These included theLIM gene signatures  as well as those derived from populations with similar cellular origin (set 4).The EGSEA report generated for this dataset is available online atEGSEA package to combine the results obtained from different gene signature databases across multiple GSE methods to find an ensemble solution. A key benefit of an EGSEA analysis is the detailed and comprehensive HTML report that can be shared with collaborators to help them interpret their data. This report includes tables prioritising gene signatures according to the user specified analysis options, and both gene set specific and summary graphics, each of which can be generated individually using specific R commands. The approach taken by EGSEA is facilitated by the diverse range of gene set testing algorithms and plotting capabilities available within Bioconductor. EGSEA has been tailored to suit a limma-based differential expression analysis which continues to be a very popular and flexible platform for transcriptomic data. Analysts who choose an individual GSE algorithm to prioritise their results rather than an ensemble solution can still benefit from EGSEA’s comprehensive reporting capability.In this workflow article, we have demonstrated how to use theEGSEA123 workflow package available from Bioconductor:https://www.bioconductor.org/help/workflows/EGSEA123.Code to perform this analysis can be found in thehttps://github.com/mritchie/EGSEA123.Latest source code is available at:https://doi.org/10.5281/zenodo.104343640.Archived source code as at the time of publication is available at:Software license: Artistic License 2.0. GSEA analysis methods do not all produce same results. Score-based gene set analysis methods like the Broad Institute GSEA tool are considered to perform better than normal Fisher’s exact test . But analysts often use methods they know to be less than ideal in order to reduce complexity and save time. So it is good to have a unified interface for GSEA analyses with R – it helps save programming time and reduces complexity. In addition EGSEA is a unique method that combines up to 12 gene set analysis methods into a single score. Independent test also corroborate that the tool using the 12 has more specificity and good sensitivity compared to using some of the tests alone. The EGSEA 1-2-3 workflow is easy to use and generate good-quality figures with the ggplot2 R package. So9me of the figures are novel compared to other packages e.g., scatter plots designed to compare different contrasts. It is also very useful that the tool can be applied to multiple contrasts at a time, although if there are too many contrasts then the number of plots becomes unwieldly . Some more technical comments: The results object is very complicated for retrieving individual method analysis results . I quite like the "biobroom" Bioconductor package that does "tidy" data frames from limma results objects. All in all a very useful package both for automating the running of lots of methods at the same time and of course for the "ensemble" method.  It is recommended to be considered to be part of a standard bioinformatics workflow.We have read this submission. We believe that we have an appropriate level of expertise to confirm that it is of an acceptable scientific standard. EGSEA is a new gene set analysis tool that combines results from multiple individual tools in R as to yield better results. The authors have published EGSEA methodology previously. This paper focuses on the practical analysis workflow based on EGSEA with specific examples. As EGSEA is a compound and complicated analysis procedure, this work serves as a valuable guidance for the users to make full use of this tool. I’ve gone through the workflow line by line, it seems to work well. However, authors can improve their work by addressing the following issues.There should be an R code script which includes all source code and concise comments like the one in company with the vignette in any Bioconductor package. It would be much easy for the users/reviewers to try the example code. It is not convenient to follow the code in this manuscript, the code need to be edit to remove the prompt symbols (> or +) at each line when copying/pasting.It takes too long to run the egsea analysis example on modest machine. It is advisable to show a lesser example in the workflow with only one gene set collection like kegg and just a few base methods like: gsa = egseaThe rank of the gsa results shown following the t = topSets(..) line is confusing. The p.adj for the top 1 gene set is not the smallest, actually much bigger than top 2, 6 and 8. Presumably, the gene sets are ranked by med.rank instead of p.adj here. However, the opposite was described in the text above near the egsea.sort line: “Although p.adj is the default option for sorting EGSEA results for convenience, ...”In addition, there is big difference between the final rank and med.rank (e.g. 1 vs 36). This may suggest inconsistent results came from different base methods. This may also be due to the large number of gene sets being tested. Again, using a smaller gene set collection and a few base methods could make the ranking more consistent.All visualization functions, i.e. plotHeatmap, plotPathway, plotGOGraph, plotMethods, plotSummary and plotBars share largely the same set of arguments, they can have a unified wrapper function like plot.gsa with an extra argument type to specify the plot type.Functions plotPathway, plotGOGraph are wrapper functions for those in the pathview and topGO package as the author noted in the text. It would be good to explicit show some message like “calling plotting function from pathview or topGO package etc”, just like the message when running egsea.http://bioinf.wehi.edu.au/EGSEA/mam-rnaseq-egsea-report/index.html.HTML report of the results is a very valuable feature for the users. However, the code can run a long time, it would be helpful to add some progress reminder message to generateReport function like egsea. BTW, the KEGG Pathway graphs are not shown properly in the report example at  I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however I have significant reservations, as outlined above. 1, and this article gives a well-written walk-through of how to use the packages.This F1000 software tool article describes the EGSEA package that incorporates many different gene set testing methods from various packages and also allows access to a wide array of gene sets from different databases through the accompanying EGSEAdata package. These packages will enable researchers to conveniently test many different methods and incorporate their results to get more robust biological insightshttp://www.genome.jp/kegg/catalog/org_list.html) and GO terms are readily available for 19 species using BioC's pre-built OrgDB packages and hundreds of other through AnnotationHub. It is unclear whether EGSEA functions buildCustomIdx and buildGMTIdx that were "written to allow users to run EGSEA on gene set collections that may have been curated within a lab or downloaded from public databases and allow use of gene identifiers other than Entrez IDs" can be used to run EGSEA on additional species. If so, this should be clearly stated in both the Abstract and in the body of the article, plus an example given on how to use buildCustomIdx for another species. If there is some reason that EGSEA cannot currently extend to other species, this should be acknowledged as a limitation and future versions should strive to allow this .  The biggest limitation I see it that EGSEA is focused only on human and mouse data (and rat? The article does not list rat but the help page for buildIdx lists rat as one of the species). I understand that many of the gene set collections like MSigDB and GeneSetDB are only available for human/mouse, but KEGG currently lists 429 Eukaryotic organisms  :  EXPR must be a length 1 vectorhttps://support.bioconductor.org/p/103640/#103748)  and got a speedy reply from the author. It hopefully will be resolved soon, although there is a concern of why the error was not found on another Windows machine.  However, I reported this error to the support site 2 prior to running EGSEA.I am concerned that as demonstrated in this paper, EGSEA seems to take the place of standard limma differential expression analysis, in that the model fitting takes place within the egsea function. Certain gene set testing functions do need the individual expression values and not just the fitted values in an MArrayLM object but given the computational time (8 min as shown in the article code block and 19 min on my own computer) you should never run egsea without first assessing the model fit on your own! Ideally the egsea function could be written to accept MArrayLM, or at least the article should clearly state that users should have first assessed the validity of the model fit through the usual workflow of LawI also wonder why there are different interfaces for voom-based analysis and microarray data given that both use EList objects. I understand that the voom weights need to be used internally, but limma's lmFit function handles both without trouble, although it was originally coded for microarray data and the voom functionality came later. Even if there needs to be a separate function egsea.ma for non-voom, non-count data, it should still accept an EList object so that the user does not have to pull out the expression data and the grouping info.Back to the computational time required, there are several vague references to removing the roast method "to save time" and that the report generation "significantly" increases run time. it would be nice to have an example of the time required to run roast and the report generation for the computational architecture that created the article.  Other issues to address before approval:I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however I have significant reservations, as outlined above. package.  EGSEA is an ensemble-like method recently published1 by the authors of this workflow that allows the user to simultaneously apply different GSEA algorithms on a high-throughput molecular profiling data set, by combining p-values associated with each algorithm using classical meta-analysis approaches such as the Fisher's method.This article describes a gene set enrichment analysis (GSEA) workflow for the "Ensembl of GSEA" (EGSEA) R/Bioconductor software Because the statistical methodology is already described in detail in the corresponding publication, the present software tool article focuses on showing a step-by-step workflow with EGSEA. However, the vignette of the software package already provides a very detailed description about how to use EGSEA through its 39 pages. Therefore, it would be useful for the interested reader to find upfront when he/she should be consulting the vignette and when he/she should be consulting this workflow. Besides this introductory aspects, the following issues should be addressed before approval:The code given in the article breaks, at least in my computer, more concretely, at this line: gsa = egsea EGSEA analysis has started ##------ Mon Nov 27 12:37:42 2017 ------## Log fold changes are estimated using limma package ... limma DE analysis is carried out ... Number of used cores has changed to 4 in order to avoid CPU overloading. EGSEA is running on the provided data and c2 collection .......camera*....safe*...gage*.padog*....gsva*..fry*...plage*...globaltest*...zscore*...ora*...ssgsea*   Error in temp.results[[baseGSEA]][[i]] :   incorrect number of dimensions while running it with the latest release version 1.6.0. This is strange since the package builds and runs the vignette without problems. So, this might be related to the different sample data sets. A possible hint may come from the fact that the 'buildIdx' call is not returning the expected class of object, according to the workflow: class(gs.annots$s2) ## [1] "NULL" summary(gs.annots$s2) ## Length  Class   Mode  ##      0   NULL   NULL The workflow contains a rather high amount of code, often with a non-trivial use of externally instantiated objects and nested calls to functions. It would be helpful for the interested reader to be able to easily copy and paste the instructions, but the fact that R commands are given with the R shell '>' and '+' symbols makes it less easy. A non-expert user may even copy those characters and get an error. I would recommend removing those characters from the illustrated code, just as it happens with the vignette.The workflow assumes that the user has a 'DGEList' object with gene metadata including the mapping between Entrez identifiers' and HGNC symbols. This is a rather unrealistic assumption and I would recommend that the workflow starts building that object from scratch and showing how to build that table of gene metadata. Below I also describe other issues that I would recommend to be considered in future versions of the software but which I do not consider them to be required for approval of this article:The so-called "summary plot" shows the -log10 p-value on the x-axis and average absolute log fold-change of the set genes on the y-axis. Because this is in a way analogous to a rotated volcano plot, I would suggest to use the same arrangement of axes as in the volcano plot, which is a rather standardized display of significance and magnitude of the effects of interest.package, in which data structures are defined to store and access gene sets and collections of gene sets of different kinds. A salient feature of that infrastructure is the possibility to seamlessly map gene identifiers of different kinds. This would simplify and improve the user experience of EGSEA since mapping between genes coded with a particular kind of identifier, and gene sets defined with another kind, is one of the most common tasks in a GSEA-like analysis.One of the key features of the Bioconductor project, to which the EGSEA package is contributing to, is enabling software interoperability through sharing the use of common data structures across different software packages.  Using specialized data structures, where analogous ones have been already designed by the Bioconductor core team or by a wider community of developers, locks the user into that package and limits the possibilities of using it as a building block in other more complex workflows. I'm making this comment because I have the impression that the EGSEA package would benefit of using the infrastructure provided by the Bioconductor GSEABase  I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however I have significant reservations, as outlined above.


Alatina alata as “opsins” in Fig. After publication of our article , it was A. alata “7 transmembrane receptor (rhodopsin family)” GPCRs revealed only two likely opsins (comp71410 and comp74136) based on the alignment of their conserved lysine (K), for retinal binding, with that of the bovine rhodopsin reference protein. Therefore, all mention of A. alata “opsin” expression in the original article should be interpreted as “rhodopsin family GPCR” expression, except when referencing the two putative opsins: comp71410  and comp74136 . In light of these new findings, Fig. A. alata opsin ORFs. The gene tree reconstructions (.tre file) and corresponding alignment are available at: https://figshare.com/articles/Supplemental_Information_for_A_new_transcriptome_and_transcriptome_profiling_of_adult_and_larval_tissue_in_the_box_jellyfish_Alatina_alata_an_emerging_modelfor_studying_venom_vision_and_sex/3471425.More stringent analysis of the A. alata opsin diversity is less broad than previously suggested does not impact the overall conclusions of our paper regarding opsin expression. Our updated findings still suggest that A. alata opsin is most abundant in the rhopalium, but also expressed in planulae, which have eyes spots, as well as in extra-ocular tissue types in the medusa, suggesting the presence of yet undescribed photoreceptors. Additional non-opsin rhodopsin family GPCRs (n = 31), whose specific identities await further analyses, are expressed in both the A. alata medusa samples and planulae. Previously we touched on the apparent diversity of A. alata rhodopsin family GPCRs, based on the fact that some of our BLAST hits for those sequences corresponded to non-opsin GPCRs , while others corresponded to various opsin types .The discovery that


Eukaryotic genome assembly remains a challenge in part due to the prevalence of complex DNA repeats. This is a particularly acute problem for holocentric nematodes because of the large number of satellite DNA sequences found throughout their genomes. These have been recalcitrant to most genome sequencing methods. At the same time, many nematodes are parasites and some represent a serious threat to human health. There is a pressing need for better molecular characterization of animal and plant parasitic nematodes. The advent of long-read DNA sequencing methods offers the promise of resolving complex genomes.Nippostrongylus brasiliensis as a test case, applying improved base-calling algorithms and assembly methods, we demonstrate the feasibility of de novo genome assembly matching current community standards using only MinION long reads. In doing so, we uncovered an unexpected diversity of very long and complex DNA sequences repeated throughout the N. brasiliensis genome, including massive tandem repeats of tRNA genes.Using Base-calling and assembly methods have improved sufficiently that de novo genome assembly of large complex genomes is possible using only long reads. The method has the added advantage of preserving haplotypic variants and so has the potential to be used in population analyses.The online version of this article (10.1186/s12915-017-0473-4) contains supplementary material, which is available to authorized users. Necator americanus and Ancylostoma duodenale continue to be a major global health problem. Next-generation sequencing (NGS) techniques open the door to molecular epidemiological monitoring of nematode and helminth parasites in endemic areas. Such studies are, however, hampered by the heterogeneous nature of parasite populations and by the intrinsically complex genome structures of nematodes -based approach using RNA-seq data gave a marginally higher complement of USCO genes, we used this gene set for further analyses. In addition to an elevated proportion of fragmented USCOs (see below), we also noted a high proportion of duplicated USCOs. Inspection revealed that some of these were bona fide lineage-specific expansions. For example, the analysis uncovered three distinct loci encoding isoforms of fructose 1,6-bisphosphatase (PFAM: PF00316), as predicted also from the WTSI assembly. Pairs of USCOs were also found on homologous contigs. There were four such examples in the 12 heterozygous branch subgraphs alone; this presumably reflects haplotypic variants.While generating a complete high-quality annotation was beyond the scope of this study, we made use of expert knowledge regarding carbohydrate-active enzymes (CAZymes) to provide a complementary insight into the predicted genes compared to the WTSI set . Of the N. brasiliensis, attempts are made to maintain genotypic diversity in the population. The assembly that we produced reflects this. Surgical transplantation of single adult parasitic worms has very recently been shown to be feasible, allowing controlled matings and the establishment of inbred lines _??????); do echo ${x}; read_fast5_basecaller.py -t 6 -i ${x} -s called_${x} -o fastq -c r94_450bps_linear.cfg; doneIllumina reads for the WTSI genome assembly were retrieved from the Sequence Read Archive (accession ERR063640). These reads were processed into k-mer counts using Jellyfish v2.2.6 , and thejellyfish count -C --bf-size 20G -t 6 -s 2G -m 21 <(zcat ERR063640_1P.fastq.gz) <(zcat ERR063640_2P.fastq.gz) -o ERR063640_mer_counts.jfjellyfish histo ERR063640_mer_counts.jf > ERR063640_mer_counts.histoUsing the FASTQ files, rather than just reads from the called pass bin, allowed a maximum amount of sequence information to be recovered. Reads were trimmed by 65 bp at each end to exclude adapters (see below), then Canu v1.5 was run with default parameters. The estimated genome size was 205 Mb as determined using GenomeScope (qb.cshl.edu/genomescope/) and the WTSI Illumina reads. Long-read sequencing of a heterogeneous population would be expected to generate a longer genome size due to the separation of haplotypes. We, therefore, made a conservative estimate of 300 Mb. The assumed genome size alters how many reads are selected for the final Canu assembly. If the coverage of corrected reads is greater than 40×, then only the longest reads are used (up to 40× coverage). In our case, the coverage was below 40× regardless of what parameters were used, so it would not be expected to alter the outcome. Within Canu, assembly parameters are adjusted when read counts are below 20× (e.g. corMinCoverage = 0) as previously described :## trim readspv called_[CFED]_*_albacore_1.1.0.fq.gz | zcat | ~/scripts/fastx-fetch.pl -t 65 | gzip > called_CFED_65bptrim_albacore_1.1.0.fq.gz## run Canu~/install/canu/canu-1.5/Linux-amd64/bin/canu -nanopore-raw called_CFED_65bptrim_albacore_1.1.0.fq.gz -p Nb_ONTCFED_65bpTrim_t1 -d Nb_ONTCFED_65bpTrim_t1 genomeSize=300 MBowtie2 was used in local mode to map RNA-seq reads to the assembled genome contigs:bowtie2 -p 10 --local -x Nb_ONTCFED_65bpTrim_t1.contigs.fasta -1 ../1563-all_R1_trimmed.fastq.gz -2 ../1563-all_R2_trimmed.fastq.gz | samtools sort > 1563_vs_uncorrected_NOCFED.bamPilon was used to correct based on the RNA-seq mapping to the genome, with structural reassembly disabled (in case it collapsed introns):java -Xmx40G -jar ~/install/pilon/pilon-1.22.jar --genome Nb_ONTCFED_65bpTrim_t1.contigs.fasta --frags 1563_vs_uncorrected_NOCFED.bam --fix snps,indels --output BT2Pilon_NOCFED --gapmargin 1 --mingap 10000000 --threads 10 --changes 2>BT2Pilon_NOCFED.stderr.txt 1>BT2Pilon_NOCFED.stdout.txtContigs that were entirely composed of homopolymer sequences were identified using grep and removed from the assembly:## identify homopolymer (and binary division-rich) regionspv BT2Pilon_NOCFED.fasta | ~/scripts/fastx-hplength.pl > hplength_BT2Pilon_NOCFED.txtpv BT2Pilon_NOCFED.fasta | ~/scripts/fastx-hplength.pl -mode YR > hplength_YR_BT2Pilon_NOCFED.txtpv BT2Pilon_NOCFED.fasta | ~/scripts/fastx-hplength.pl -mode SW > hplength_SW_BT2Pilon_NOCFED.txtpv BT2Pilon_NOCFED.fasta | ~/scripts/fastx-hplength.pl -mode MK > hplength_MK_BT2Pilon_NOCFED.txt## example grep hunt for repeated sequencecat BT2Pilon_NOCFED.fasta | grep -e '^[AT]\{80\}' -e '^>' | grep --no-group-separator -B 1 '^[AT]\{80\}' | ~/scripts/fastx-length.pl## exclude contigs and sort by length~/scripts/fastx-fetch.pl -v tig00010453 tig00024413 tig00024414 tig00023947 | ~/scripts/fastx-sort.pl -l > Nb_ONTCFED_65bpTrim_t1.contigs.hpcleaned.fastaThis produced the final assembly described in the paper. At this stage, we had an assembled genome, but validation of the genome was difficult. We decided to carry out a draft genome-guided transcriptome assembly with Trinity. To evaluate the completeness of the genome, we focused on expressed genes and used a set of Illumina RNA-seq reads to perform a genome-guided transcriptome assembly using Trinity.The RNA-seq reads were remapped to the corrected assembly for genome-guided Trinity:bowtie2 -p 10 -t --local --score-min G,20,8 -p 10 -x BT2Pilon_NOCFED_hpcleaned.fasta --rf -X 15000 -1../1563-all_R1_trimmed.fastq.gz -2 < 2>bowtie2_1563_vs_BNOCFED_hp.summary.txt | samtools sort > bowtie2_1563_vs_BNOCFED_hp.bam## Trinity assembly; assume introns can be up to 15 kb in length~/install/trinity/trinityrnaseq-Trinity-v2.4.0/Trinity --CPU 10 --genome_guided_bam bowtie2_1563_vs_BNOCFED_hp.bam --genome_guided_max_intron 15000 --max_memory 40G --SS_lib_type RF --output trinity_BNOCFEDThe assembly that Trinity generated had similar completeness (as measured by BUSCO) to a de novo assembly generated using the same RNA-seq reads (see Table https://www.ebi.ac.uk/ena/data/view/ERS1809079), where details of the samples can be found.Our RNA-seq data is publicly available from the European Nucleotide Archive of the European Bioinformatics Institute  were usThe RNA-seq reads were mapped to the Trinity-generated transcripts using Salmon:## create Salmon index~/install/salmon/Salmon-0.8.2_linux_x86_64/bin/salmon index -t Trinity-BNOCFED.fasta -i Trinity-BNOCFED.fasta.sai## quantify transcript coverage with Salmon~/install/salmon/Salmon-0.8.2_linux_x86_64/bin/salmon quant -i Trinity-BNOCFED.fasta.sai -1 ../../1563-all_R1_trimmed.fastq.gz -2 ../../1563-all_R2_trimmed.fastq.gz -p 10 -o quant/1563-all_quant -l AThe expression of BUSCO genes was used to set a credible signal cutoff -db missing_busco_list_intersectionBUSCO_nematodes.fasta -outfmt 6 -evalue 1e-3 > BLAST_NOCFED_vs_BUSCO_missing_intersection.tsvHits for the same contig/USCO combination were merged using a custom script, and sequence extracted from the assembly to cover the entire matched region: > BLAST_NOCFED_vs_BUSCO_missing_intersection.fastahttp://onecodex.com). Reads that mapped to any DNA in the OneCodex database were excluded from the read set:DNA extracted from a single adult worm was amplified using a Qiagen Midi RepliG kit. Raw reads and called FASTQ files were obtained from ONT  following sequencing. Reads were filtered to exclude those from contaminating DNA using OneCodex ((zcat OneCodex_RefSeq_132394.fastq.gz.results.tsv.gz | awk '{if($3 == 0){print $1}}'; zcat OneCodex_OCD_132394.fastq.gz.results.tsv.gz | awk '{if($3 == 0){print $1}}') | sort | uniq -d | gzip > OCunmapped_names_132394.txt.gzpv 132394.fastq.gz | zcat | ~/scripts/fastx-fetch.pl -i OCunmapped_names_132394.txt.gz | ~/scripts/fastx-fetch.pl -v -i ONTmapped_names_132394.txt.gz | gzip > OCunmapped_ONTunmapped_132394.fastq.gzFiltered reads from the WGA sample were called using Albacore 1.1.0:read_fast5_basecaller.py -o fastq -i A_132394 -t 10 -s called_A_132394 -c r94_450bps_linear.cfgReads with a length of greater than 10 k were extracted for subsequent analysis:pv called_A_132394_albacore_1.1.0.fq.gz | zcat | ~/scripts/fastx-fetch.pl --min 10000 | gzip > 10k_called_A_132394_albacore_1.1.0.fq.gzTo define the region of raw nanopore sequences for adapter exclusion, the >10 k reads were mapped to 50 M reads that had been generated by WTSI and that had been used for the existing WTSI assembly:bowtie2 -p 10 --no-unal --no-mixed --local -x 10k_called_A_132394_albacore_1.1.0.fa -1 <(pv ~/bioinf/MIMR-2017-Jan-01-GBIS/GLG/ONT/aws/Sampled_50M_ERR063640.R1.fq.gz | zcat) -2 ~/bioinf/MIMR-2017-Jan-01-GBIS/GLG/ONT/aws/Sampled_50M_ERR063640.R2.fq.gz | samtools sort > WTSI_Sampled_50M_vs_10k_called_A_132394.bam## find position of first mapped Illumina read for each nanopore readpv WTSI_Sampled_50M_vs_10k_called_A_132394.bam | samtools view - | awk '{print $3,$4}' | sort -k 1,1 -k 2,2n | sort -u -k 1,1 | gzip > firstHit_WTSI_Sampled_50M_vs_10k_called_A_132394.txt.gz## determine position of last mapped Illumina readpv WTSI_Sampled_50M_vs_10k_called_A_132394.bam | samtools view - | awk '{print $3,$4}' | sort -k 1,1 -k 2,2rn | sort -u -k 1,1 | gzip > lastHit_WTSI_Sampled_50M_vs_10k_called_A_132394.txt.gz## count positions of first readszcat firstHit_WTSI_Sampled_50M_vs_10k_called_A_132394.txt.gz | awk '{print $2}' | sort -n | uniq -c | gzip > firstBase_counts_WTSI_Sampled_50M_vs_10k_called_A_132394.txt.gzWhen we mapped the 5' ends of Illumina reads to the start of nanopore reads with Bowtie2, there was a common register shift of 28–32 bases, corresponding to the presence of adapter sequences in the nanopore reads. Reads were conservatively trimmed by 65 bases at each end to exclude adapters:pv called_A_132394_albacore_1.1.0.fq.gz | zcat | ~/scripts/fastx-fetch.pl --min 1130 --max 1000000 | \~/scripts/fastx-fetch.pl -t 65 | gzip > 65bpTrim_called_A_132394_albacore_1.1.0.fq.gzCanu v1.5 was used to assemble the trimmed reads. The assembly was done in stages (with an assembly at each stage) to determine whether or not particular stages were redundant for the assembly:## attempt assembly-only with Canu v1.5~/install/canu/canu-1.5/Linux-amd64/bin/canu -assemble -nanopore-raw 65bpTrim_called_A_132394_albacore_1.1.0.fq.gz -p Nb_ONTA_65bpTrim_t1 -dNb_ONTA_65bpTrim_t1 genomeSize=300 M## attempt assembly + correction~/install/canu/canu-1.5/Linux-amd64/bin/canu -assemble -nanopore-corrected 65bpTrim_called_A_132394_albacore_1.1.0.fq.gz -p Nb_ONTA_65bpTrim_t2 -d Nb_ONTA_65bpTrim_t2 -correct genomeSize=300 M## attempt stringent trim with corrected reads~/install/canu/canu-1.5/Linux-amd64/bin/canu -trim-assemble -p Nb_ONTA_65bpTrim_t3 -d Nb_ONTA_65bpTrim_t3 genomeSize=300 M -nanopore-corrected Nb_ONTA_65bpTrim_t2/Nb_ONTA_65bpTrim_t2.correctedReads.fasta.gz -trim-assemble trimReadsOverlap=500 trimReadsCoverage=5 obtErrorRate=0.25An alternative, less-stringent overlap was also attempted (with trimReadsCoverage = 2), but resulted in a less complete assembly. The results of an analysis surrounding the different assemblies suggested that the default Canu assembly process of correction, trimming, then assembly produced the best outcome, namely the WGA assembly presented in Table Canu includes a step of normalization, reducing the shortest reads, if coverage is over a predefined threshold, but that normalization threshold was not triggered for our assembly. We did not attempt a k-mer-based normalization, since this would not resolve the incomplete genome sequence coverage. Selective amplification combined with random sampling by the sequencer means that poorly amplified regions were unlikely to be present in the sequenced reads. We did notice that an assembly combining both WGA and unamplified DNA samples produced a more fragmented genome, which is why a combined assembly is not presented here. It is possible that k-mer normalization of the WGA reads might improve such a hybrid assembly.Additional file 1: Table S1.Detailed comparative sequence analysis and genome assembly statistics. (DOCX 12 kb)Additional file 2: Figure S1.Dot plots of all-against all sequence comparisons between the five most compressible VeCTR regions, based on minimum-distance alignments using LAST-align, created using LAST-dotplot. The names of the corresponding contigs and the coordinates of the plotted regions are indicated for each VeCTR and their unique flanking sequences. The longest of these five VeCTRs corresponds to 147 repeats of tRNA-Trp followed by 114 bp of non-conserved sequence, while the shortest contains 90 copies of tRNA-Ser with 80 bp of non-conserved sequence. (PDF 69 kb)Additional file 3: Figure S2.a Venn diagram showing the overlap for USCOs flagged as missing in the analysis of three genome assemblies (Uncorrected (Canu only), Nanopolish and Trinity [genome-guided]; see Table b,d) and the sequence alignment, generated using Muscle, with the predicted N. brasiliensis protein sequence extracted from the tblastn alignment . For both N. brasiliensis sequences, note the presence of stop codons (*) in the sequence; these will confound BUSCO analysis. (PDF 398 kb)Potential orthologs of missing USCOs. Additional file 4: Table S2.BLAST hits for missing USCOs (see Excel file). (XLSX 78 kb)Additional file 5: Table S3.CAZy analysis (see Excel file). (XLSX 265 kb)Additional file 6: Figure S3.Distribution of read lengths for whole-genome amplified (WGA) DNA. Comparison of the distribution of read lengths for amplified DNA (WGA) and unamplified DNA extracted by method 1 see Fig. .


However, tools for integrating an assembled transcriptome with reference annotation are lacking.RNA sequencing (RNA-seq) analyses can benefit from performing a genome-guided and de novo assembly and combines the resulting transcriptomes with reference genome annotations. Necklace constructs a compact but comprehensive superTranscriptome out of the assembled and reference data. Reads are subsequently aligned and counted in preparation for differential expression testing.Necklace is a software pipeline that runs genome-guided and Necklace allows a comprehensive transcriptome to be built from a combination of assembled and annotated transcripts, which results in a more comprehensive transcriptome for the majority of organisms. In addition RNA-seq data are mapped back to this newly created superTranscript reference to enable differential expression testing with standard methods. Despite the increasing number of species with a sequenced genome, the vast majority of reference genomes are incomplete. They may contain gaps, have unplaced assembly scaffolds, and be poorly annotated. The naïve approach to analyzing RNA sequencing (RNA-seq) on species with a genome would follow the same procedure as for model organisms, i.e., align reads the genome and count reads overlapping annotated genes, then test for differential expression based on gene counts . Howeverde novo assembly y ← DGEList(counts = counts)Genes with a counts per million (cpm) less than or equal to 0.5 in fewer than four samples were filtered out and the libraries normalized.keep ← rowSums(cpm(y) > 0.5) > = 4y ← yy ← calcNormFactors(y)We then estimated the dispersion and looked for differential expression with an FDR <0.05:y ← estimateDispfit ← glmFitqlf ← glmLRTis.de ← decideTestsProject name: NecklaceRRID:SCR_016103Scicrunch https://github.com/Oshlack/necklace/wikiProject home page: Operating systems: LinuxProgramming language: Groovy and C/C++Other requirements: Java 1.8License: GPL 3.0GigaScience GigaDB repository [An archival snapshot of the code is available in the pository .bp: base pair; cpm: counts per million; FDR: false discovery rate; RNA-seq: RNA sequencing.GIGA-D-17-00354.pdfClick here for additional data file.GIGA-D-17-00354_R1.pdfClick here for additional data file.GIGA-D-17-00354_R2.pdfClick here for additional data file.Response_to_Reviewer_Comments_Original_Submission.pdfClick here for additional data file.Response_to_Reviewer_Comments_Revision_1.pdfClick here for additional data file.Reviewer_1_Report_ -- Li Song1/12/2018 ReviewedClick here for additional data file.Reviewer_1_Report_(Revision_1) -- Li Song3/25/2018 ReviewedClick here for additional data file.Reviewer_2_Report_ -- Mickael Orgeur1/16/2018 ReviewedClick here for additional data file.Reviewer_2_Report_(Revision_1) -- Mickael Orgeur3/21/2018 ReviewedClick here for additional data file.


Erwinia amylovora is the causal agent of fire blight, a devastating disease affecting some plants of the Rosaceae family. We isolated bacteriophages from samples collected from infected apple and pear trees along the Wasatch Front in Utah. We announce 19 high-quality complete genome sequences of E. amylovora bacteriophages. Erwinia amylovora is a Gram-negative facultative anaerobic rod-shaped bacterium and the causative agent of fire blight  and sequenced using 454 pyrosequencing  or Illumina HiSeq 2500 sequencing . Contigs were assembled using Newbler version 2.9  and Consed  and otheThe 19 phages fell into five distinct clusters according to genomic analysis. The first group included the jumbo myoviruses vB_EamM_Deimos-Minion, vB_EamM_RAY, vB_EamM_Simmy50, and vB_EamM_Special G, which share a minimum of 97.2% average nucleotide identity to one another. The second group included two jumbo myoviruses, vB_EamM_RisingSun and vB_EamM_Joad, which differ by only two putative gene products. The third group included diverse jumbo myoviruses vB_EamM_Caitlin, vB_EamM_ChrisDB, vB_EamM_EarlPhillipIV, vB_EamM_Huxley, vB_EamM_Kwan, vB_EamM_Machina, vB_EamM_Parshik, vB_EamM_Phobos, and vB_EamM_Stratton, which share a minimum of 50.5% average nucleotide identity. An additional jumbo myovirus, vB_EamM_Yoloswag, did not have any close phage relatives. Podovirus phages vB_EamP_Frozen, vB_EamP_Gutmeister, and vB_EamP_Rexella share at least 97.2% average nucleotide identity. The four jumbo myovirus groups package DNA by headful packaging based on homology of their putative terminase genes to the phiKZ terminase  and GepaErwinia bacteriophages are listed in GenBank accession numbers for the 19


Evidence has shown that physical activity may attenuate the negative physical, psychological and functional effects of treatment in women diagnosed with breast cancer. Physical activity levels also decline substantially during and after completion of treatment for cancer, highlighting the importance of strategies to promote participation in regular physical activity in this population. Oncologists and surgeons may serve as an influential source of motivation to be physically activity in cancer patients, by conveying the importance of a healthy lifestyle. The primary purpose of the present study was to investigate whether oncologists and surgeons routinely discuss physical activity with their breast cancer patients and to investigate the nature of any information/advice provided during consultations. A secondary aim was to examine whether physically active oncologists and surgeons were more likely to provide advice about physical activity to patients, than inactive oncologists and surgeons. A brief postal questionnaire was sent to 710 consultant breast cancer oncologists and surgeons throughout the UK and 102 responded (response rate = 14.4%). Of responders, most (55.9%) did not routinely discuss physical activity with their patients. Amongst oncologists/surgeons (clinicians) who did offer advice, most focussed on discussing the benefits of physical activity for physical and functional health gains and for facilitating weight control and maintenance. A number of clinicians indicated they advised patients that physical activity may decrease risk of recurrence and improve survival, despite the lack of evidence from RCTs to support this suggestion. There was no significant association between the physical activity status of oncologists/surgeons and the likelihood that they discussed physical activity with patients. Educational strategies aimed at encouraging clinicians to promote physical activity in consultations need to be targeted widely amongst the cancer clinician community. Evidence from RCTs has shown that physical activity may attenuate the negative effects of cancer treatment in women diagnosed with breast cancer ,2. RatesOncologists and surgeons may serve as an important source of motivation by encouraging patients to be physically active and by conveying the importance of a healthy lifestyle after cancer diagnosis. Oncologists have also been found to have a favourable attitude towards promoting exercise with cancer patients ,6. In adStudies ,6 conducAs part of the development procedures for a RCT of the effects of physical activity on breast outcome, a brief anonymous postal questionnaire (see Appendix 1) was sent (one mailing with no reminders) to 710 consultants registered with the Cancer Research UK Clinical Trials Unit database and comprised of 332 surgeons, 255 clinical oncologists and 84 medical oncologists (clinicians). Clinicians were asked to report whether they routinely provided advice to patients about physical activity during consultations and to indicate the nature and context of any advice provided. An open comment section was included in the questionnaire where clinicians were given the opportunity to provide written details of the advice they gave to patients. Clinicians were also asked to indicate who they believed would be the most suitable health professional to deliver physical activity intervention/advice to breast cancer patients . In addition, the questionnaire also included items to assess clinicians' age, gender, medical speciality and the amount of moderate intensity physical activity that they typically achieved per week.A total of 102 breast cancer consultants  working across 65 sites in the UK responded to the study questionnaire (response rate = 14.4%). The majority of responders were from district hospitals (56%) and worked in specialist cancer centres (63%). Most respondents were aged 40–50 years (n = 44) or 50–60 years (n = 37). Of responders, 44.1% (n = 45) routinely gave advice to their patients about physical activity. Walking was the most commonly advocated type of activity although advice relating to the duration and intensity of physical activity that patients were encouraged to achieve varied considerably [see additional file]. The nature of the advice provided can be broadly categorised into five main themes; benefits for recurrence and mortality, benefits for weight control and management, benefits for physical and functional health, benefits of active healthy living and general comments about physical activity prescription [see additional file Chi-squared analysis showed that oncologists were significantly (p < 0.01) more likely to give patients advice about physical activity than surgeons (n = 36/60: 60.0% versus n = 9/38: 23.7%). Relatively few clinicians (36.5%: n = 33/85) were themselves meeting current public health recommendations for physical activity of at least 150 minutes of moderate intensity physical activity per week. Chi-squared analysis indicated no relationship between physical activity status  and whether clinicians promoted physical activity with their patients (yes or no). Clinicians felt nurses (50%: n = 51) and physiotherapists (33.3%: n = 34) were the most suitable health professionals to deliver physical activity interventions to breast cancer patients; 11.8% indicated 'other health professional' in response to this question (e.g. fitness instructor). Only 1.9% (n = 2) of clinicians felt oncologists were the most suitable person to deliver physical activity interventions and no respondents indicated that surgeons were suitable.This study found that about 44% of clinicians gave advice to their patients about physical activity. This finding is consistent with previous research  conducteOncologists were much more likely to promote physical activity with their patients than surgeons; this might be because oncologists have greater levels of contact with patients during follow-up and/or because they see patients at the completion of treatment and give formal advice on prevention of relapse. In contrast, surgeons see patients during active treatment when advice about physical activity may not be as appropriate. These findings also serve to highlight differences in practice between clinicians of different sub-specialities and help to identify where the greatest need for training might lie. Results are also in broad agreement with a previous study  which foAmongst clinicians who did offer physical activity advice, most focussed on the physical and functional benefits that it can provide and its role in facilitating weight maintenance. It was interesting to note that many clinicians discussed physical activity with patients in the context that participation may decrease their risk of recurrence and improve survival. Currently there is only epidemiological evidence to support an association between physical activity and mortality from breast cancer and RCTs are still required to confirm any potential survival benefit.About a third of clinicians were meeting the current public health recommendations for physical activity per week, which is similar to rates found for the general population in the UK . Those cThis study should be interpreted in the context of several limitations. The response rate was low and those who did respond may not be representative of all oncologists and surgeons. Larger studies may be better positioned to explore these issues more precisely. However, responses were obtained from male and female clinicians of different ages located at sixty-five sites throughout the UK and this should serve to increase the generalisability of the findings. It is anticipated that responders were more likely to have some interest in physical activity than non-responders and therefore these findings may represent a 'best case scenario' regarding current practice of cancer clinicians.To the best of our knowledge this is the first study of its kind to take place in the UK and to provide information about both the qualitative and quantitative nature of the physical activity advice given to patients by oncologists and surgeons. Previous studies from North America have focussed on oncologists and less is known about the practice of cancer surgeons in relation to physical activity; the present study addresses this gap in the literature.Many clinicians discuss physical activity with their patients but a large proportion do not. Few clinicians felt that they were best placed to offer patients advice about physical activity and this may explain why many do not do so. Greater efforts need to be made to educate cancer clinicians in the UK about physical activity so that patients are routinely advised about the health benefits that participation might provide both during and after active treatment for breast cancer.RCTs: randomised controlled trials; UK: United Kingdom.The authors declare that they have no competing interests.AJD drafted the manuscript and conducted the analyses. SJB coordinated the study, helped to draft the manuscript and contributed to data analysis. All authors participated in conceptualisation and design of the questionnaire study. All authors read and approved the final version of the manuscript.1) Indicate your profession:Clinical Oncologist □ Medical Oncologist □ Surgeon □2) Would you normally give patients advice regarding exercise? No □ Yes □If yes, briefly describe the advice you would give below:_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________3) Who would you consider most suitable to deliver an exercise intervention?Research Nurse □ Physiotherapist □Surgeon □ Oncologist □Other □ please specify:_____________________________4) We would be grateful if you could provide the following optional information about yourselfa) What is your gender? Female □ Male □b) What is your age range in years? < 30 □ 30–40 □ 40–50 □ 50–60 □ > 60 □c) In a typical week how many times, and for how long, do you participate in moderate intensity exercise Number of times per week: _____________Average time per session: _____________ minutesAdvice given to breast cancer patients by consultant oncologists and surgeons in the UK. This information provided an overview of the type of advice given to breast cancer patients by consultant oncologists and surgeons.Click here for file


All instances of the symbols "t_ant_clear" and "t_syn_clear" relating to Figures 4 and S2 should instead read "N_ant_double" and "N_syn_double" respectively. Similarly, all instances of "sigma_syn/sigma_ant" relating to Figures S2 and S3 should read "N_ant_double/N_syn_double."