Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this user
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
fdabbagh
/
shiny-app
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
0
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security
Insights
Files
735a023
app
functions
check_project.r
combat_batch_effect.r
convert_to_link.r
dnase1_score_matrix.r
extract_metadata.r
inserted_chr_list.r
inserted_ui.r
list_experiments.r
list_rna_seq_data.r
matrix_summary_table.r
pie_chart.r
plot_correlation.r
plot_pca_labels.r
plotly_pca.r
plotting_rna_seq_ontology_compare.r
rna_seq_data.r
ruv_batch_effect.r
sample_id_name_mapping.r
sample_summary.r
score_matrix_annotations.r
score_matrix_tiling_regions.r
supervised_sva_batch_effect.r
sva_batch_effect.r
server
www
.gitignore
README.md
Breadcrumbs
shiny-app
/
functions
/
list_experiments.r
Copy path
Blame
Blame
Latest commit
History
History
72 lines (59 loc) · 2.54 KB
Breadcrumbs
shiny-app
/
functions
/
list_experiments.r
Top
File metadata and controls
Code
Blame
72 lines (59 loc) · 2.54 KB
Raw
# This function calls for experiments chosen by the user and filter only the files with the "VALUE" # Column after getting all the info. list_experiments <- function(genome, epigenetic_mark, project, user_key, filter_coverage = TRUE){ incProgress(amount = 1, message = "Listing all experiments") #Getting experiments experiments <- deepblue_list_experiments(genome = genome, epigenetic_mark = epigenetic_mark, project = project, user_key = user_key) #In case no experiments returned, the function will just return an empty line if (experiments[1] == "\n"){ return(NULL) } #filter tepic experiments if(project == "TEPIC reprocessed IHEC data"){ experiments <- experiments[grep(pattern = "*.reg.rpm.bed", deepblue_extract_names(experiments)),] } #filtering the coverage out if(filter_coverage == TRUE){ coverage_files <- grep("coverage", experiments$name, ignore.case = TRUE) if(length(coverage_files) != 0){ experiments <- experiments[-coverage_files] } } #Getting experiments info incProgress(amount = 1, message = "Getting information for listed experiments") experiments_info <- deepblue_info(id = experiments$id, user_key = user_key) #From the list of experiments, I only need to keep the ones with the VALUE column format <- "CHROMOSOME,START,END,VALUE" experiments_to_keep <- list() incProgress(amount = 1, message = "Filtering experiments") for (i in 1:length(experiments_info)){ if (experiments_info[[i]]$format == format){ experiments_to_keep[i] <- i } } if(length(experiments_to_keep) != 0){ experiments_info <- experiments_info[unlist(experiments_to_keep)] experiments <- experiments[unlist(experiments_to_keep)] } #Filter experiments with missing metadata if (length(grep("Warning", experiments_info, ignore.case = TRUE)) == 0){ experiments <- experiments }else{ to_remove <- as.vector(grep("Warning",experiments_info, ignore.case = TRUE)) experiments <- experiments[-to_remove,] experiments_info <- experiments_info[-to_remove] } #Return a list with two elements, First is the lsit of experiments #the second is all the information in a list all_experiments <- list(experiments, experiments_info) incProgress(amount = 0, message = "Done!!") return(all_experiments) }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
You can’t perform that action at this time.