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
0a04f30
bin
Modules
RegGTFExtractor.py
bed_to_fasta.R
call_peaks.py
call_peaks.yaml
compareBed.sh
get_best_motif.py
maxScore.R
merge.R
config
README.md
masterenv.yml
nextflow.config
pipeline.nf
uropa.config
Breadcrumbs
master_project_JLU2018
/
bin
/
bed_to_fasta.R
Blame
Blame
Latest commit
History
History
28 lines (23 loc) · 1.06 KB
Breadcrumbs
master_project_JLU2018
/
bin
/
bed_to_fasta.R
Top
File metadata and controls
Code
Blame
28 lines (23 loc) · 1.06 KB
Raw
#!/usr/bin/env Rscript # Splitting BED-files depending on their cluster. # The Sequences of each cluster are writen as an FASTA-file. # @parameter bedInput <string> BED-file with sequences and cluster-id as column"TEs # @parameter prefix <string> prefix for filenames # @parameter min_seq <INT> min. number of sequences per cluster args = commandArgs(trailingOnly = TRUE) bedInput <- args[1] prefix <- args[2] min_seq <- args[3] bed <- data.table::fread(bedInput, header = FALSE, sep = "\t") clusters <- split(bed, bed$V8, sorted = TRUE, flatten = FALSE) # <---- Spalte mit Cluster discard <- lapply(1:length(clusters), function(i){ clust <- as.data.frame(clusters[i]) print(nrow(clust)) if (nrow(clust) >= as.numeric(min_seq) ) { sequences <- as.list(clust[[7]]) # <---- Splate mit Sequenz outfile <- paste0(prefix,"_cluster_",i,".FASTA") seqinr::write.fasta(sequences = sequences, names = clust[[4]], file.out = outfile, as.string = TRUE) # <---- Spalte mit Name } else { print(paste0("Cluster: ",i," is to small")) } })
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
You can’t perform that action at this time.