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 organization
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 }}
loosolab
/
master_project_JLU2018
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
7
Pull requests
1
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
3faf37a
bin
Modules
config
RegGTFExtractor.py
bed_to_fasta.R
call_peaks.py
call_peaks.yaml
cdhit_wrapper.R
compareBed.sh
get_best_motif.py
maxScore.R
merge.R
reduce_bed.R
config
.gitignore
README.md
masterenv.yml
nextflow.config
pipeline.nf
uropa.config
Breadcrumbs
master_project_JLU2018
/
bin
/
merge.R
Blame
Blame
Latest commit
History
History
23 lines (19 loc) · 1.05 KB
Breadcrumbs
master_project_JLU2018
/
bin
/
merge.R
Top
File metadata and controls
Code
Blame
23 lines (19 loc) · 1.05 KB
Raw
#!/home/jhamp/.conda/envs/tfbs/bin/Rscript args=commandArgs(TRUE) min=as.numeric(args[1]) max=as.numeric(args[2]) folder=args[3] splitted = read.table(paste(folder, "/pass2Tr.bed", sep=''), header=FALSE) colnames(splitted) = c("chromosome", "start", "stop", "id", "score", "maxpos", "length") p1 = read.table(paste(folder, "/pass1Tr.bed", sep=''), header=FALSE) colnames(p1) = c("chromosome", "start", "stop", "id", "score", "maxpos", "length") p1$maxpos = p1$start + p1$maxpos splitted=rbind(splitted, p1) splitted=splitted[which(splitted$stop - splitted$start >= min),] splitted=splitted[which(splitted$stop - splitted$start <= max),] splitted$id=make.unique(as.character(splitted$id)) splitted$length=splitted$stop - splitted$start splitted=cbind(splitted, containsMaxpos=0) splitted$containsMaxpos[intersect(which(splitted$start <= splitted$maxpos), which(splitted$stop > splitted$maxpos))] = 1 splitted$maxpos = splitted$maxpos - splitted$start write.table(splitted, paste(folder, "/merged.bed", sep=''), row.names=FALSE, col.names=FALSE, quote=FALSE, sep='\t')
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
You can’t perform that action at this time.