Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
ngs_tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioinfo
ngs_tools
Commits
2ebf7a24
Commit
2ebf7a24
authored
10 years ago
by
Melanie Schneider
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
ssh://git-srv1/local/git/bioinformatics
parents
08a3bee1
9b972130
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dge_workflow/dge_analysis.R
+2
-51
2 additions, 51 deletions
dge_workflow/dge_analysis.R
dge_workflow/dge_utils.sh
+1
-1
1 addition, 1 deletion
dge_workflow/dge_utils.sh
misc/spin.R
+11
-0
11 additions, 0 deletions
misc/spin.R
misc/spin_utils.sh
+20
-0
20 additions, 0 deletions
misc/spin_utils.sh
with
34 additions
and
52 deletions
dge_workflow/dge_analysis.R
+
2
−
51
View file @
2ebf7a24
...
...
@@ -42,7 +42,7 @@ devtools::source_url("https://dl.dropboxusercontent.com/u/113630701/datautils/R/
devtools
::
source_url
(
"https://dl.dropboxusercontent.com/u/113630701/datautils/R/ggplot_commons.R"
)
require
(
cummeRbund
)
devtools
::
source_url
(
"https://dl.dropboxusercontent.com/u/113630701/datautils/R/bio/
cummerutil
s.R"
)
devtools
::
source_url
(
"https://dl.dropboxusercontent.com/u/113630701/datautils/R/bio/
diffex_common
s.R"
)
#knitr::opts_knit$set(root.dir = getwd())
...
...
@@ -286,62 +286,12 @@ save(degs, file=".degs.RData")
#' ## Term enrichment
#+ echo=FALSE
#fpkmMatrix(genes(cuff)) %>% head()
ontologies
<-
c
(
"GOTERM_CC_FAT"
,
"GOTERM_MF_FAT"
,
"GOTERM_BP_FAT"
,
"PANTHER_PATHWAY"
,
"REACTOME_PATHWAY"
,
"KEGG_PATHWAY"
,
"GOTERM_CC_FAT"
,
"GOTERM_MF_FAT"
,
"GOTERM_BP_FAT"
)
#' This analysis was performed using [David](http://david.abcc.ncifcrf.gov/). The following ontologies were tested: `r paste(ontologies, collapse=', ')`
require
(
RDAVIDWebService
)
## just works if installed on non-network-drive (e.g. /tmp/)
geneLists
<-
degs
%>%
# transmute(ensembl_gene_id, list_id=paste(sample_1, "vs", sample_2, "ovex", sample_1_overex, sep="_"))
transmute
(
ensembl_gene_id
,
list_id
=
paste
(
sample_1
,
"vs"
,
sample_2
))
## http://www.bioconductor.org/packages/release/bioc/vignettes/RDAVIDWebService/inst/doc/RDavidWS-vignette.pdf
## e.g. getClusterReport --> plot2D
davidAnnotationChart
<-
function
(
someGenes
){
## expexted to have a column with gene_id
# echo("processing list with", length(someGenes), "genes")
# someGenes <- degs$ensembl_gene_id
if
(
length
(
someGenes
)
>
1500
){
someGenes
<-
sample
(
someGenes
)
%>%
head
(
1500
)
}
david
<-
DAVIDWebService
$
new
(
email
=
"brandl@mpi-cbg.de"
)
# getTimeOut(david)
setTimeOut
(
david
,
80000
)
## http://www.bioconductor.org/packages/release/bioc/vignettes/RDAVIDWebService/inst/doc/RDavidWS-vignette.pdf
result
<-
addList
(
david
,
someGenes
,
idType
=
"ENSEMBL_GENE_ID"
,
listName
=
paste0
(
"list_"
,
sample
(
10000
)[
1
]),
listType
=
"Gene"
)
david
%>%
setAnnotationCategories
(
ontologies
)
annoChart
<-
getFunctionalAnnotationChart
(
david
)
# clusterReport <-getClusterReport(david)
return
(
annoChart
%>%
subset
(
select
=-
Genes
))
}
grpdDegs
<-
if
(
split_hit_list
){
degs
%>%
group_by
(
sample_1
,
sample_2
,
sample_1_overex
)
}
else
{
...
...
@@ -350,6 +300,7 @@ grpdDegs <- if(split_hit_list){
enrResults
<-
grpdDegs
%>%
do
(
davidAnnotationChart
(
.
$
ensembl_gene_id
))
write.delim
(
enrResults
,
file
=
"enrResults.txt"
)
# enrResults <- read.delim("enrResults.txt")
#' [Enrichment Results](enrResults.txt)
...
...
This diff is collapsed.
Click to expand it.
dge_workflow/dge_utils.sh
+
1
−
1
View file @
2ebf7a24
...
...
@@ -287,7 +287,7 @@ cp -r . $tmpDbDir
genome
=
$(
echo
$gtfFile
|
cut
-f7
-d
'/'
)
;
echo
"genome is
$genome
"
## make sure to use temp-r to avoid file locking problems
R_LIBS
=
/tmp/r_index
export
R_LIBS
=
/tmp/r_index
echo
'
require(cummeRbund)
...
...
This diff is collapsed.
Click to expand it.
misc/spin.R
+
11
−
0
View file @
2ebf7a24
...
...
@@ -70,8 +70,19 @@ cssHeader='
max-width: 90%;
}
</style>
<!-- add jquery datatable support -->
<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.4/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="http://code.jquery.com/jquery-2.1.2.min.js"></script>
<script type="text/javascript" charset="utf8" src="http://cdn.datatables.net/1.10.4/js/jquery.dataTables.js"></script>
'
#<!-- add bootstrap support -->
#<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
#<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
## custom title http://stackoverflow.com/questions/14124022/setting-html-meta-elements-with-knitr
opts_chunk
$
set
(
cache
=
spin_opts
$
c
,
...
...
This diff is collapsed.
Click to expand it.
misc/spin_utils.sh
0 → 100755
+
20
−
0
View file @
2ebf7a24
spinsnip
(){
if
[
$#
-ne
1
]
;
then
>
&2
echo
"Usage: spinsnip <report name> [other args]*"
return
fi
reportName
=
$1
tmpR
=
$(
echo
$reportName
|
tr
" "
"_"
)
.R
## http://stackoverflow.com/questions/11454343/pipe-output-to-bash-function
cat
|
sed
's/#>/#'
"'"
'/g'
>
$tmpR
echo
"spining
$tmpR
..."
shift
spin.R
$tmpR
$*
rm
$tmpR
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment