Mercurial > repos > petr-novak > dante_ltr
changeset 9:1aa578e6c8b3 draft
"planemo upload commit 9488b982bae902f1868785ec4ad47134dac50ff3"
author | petr-novak |
---|---|
date | Wed, 29 Jun 2022 09:25:54 +0000 |
parents | 9de392f2fc02 |
children | a004cd05177d |
files | R/ltr_utils.R extract_putative_ltr.R |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/R/ltr_utils.R Tue Jun 28 12:33:22 2022 +0000 +++ b/R/ltr_utils.R Wed Jun 29 09:25:54 2022 +0000 @@ -138,20 +138,20 @@ gr <- GRanges(seqnames = sapply(gx, function(x)x$seqnames[1]), IRanges(start = S - offset, end = E + offset)) } -get_ranges_left <- function(gx, offset = OFFSET, offset2 = 10) { +get_ranges_left <- function(gx, offset = OFFSET, offset2 = 300) { ## offset2 - how many nt cen LTR extend to closes protein domain ## this is necassary as some detected proteins domains does not have correct bopundaries ## if LTR retrotransposons insters to other protein domain. S <- sapply(gx, function(x)min(x$start)) - max_offset <- S - sapply(gx, function(x)min(x$upstream_domain)) + offset2 + max_offset <- S - sapply(gx, function(x)min(x$upstream_domain)) + 10 offset_adjusted <- ifelse(max_offset < offset, max_offset, offset) gr <- GRanges(seqnames = sapply(gx, function(x)x$seqnames[1]), IRanges(start = S - offset_adjusted, end = S + offset2)) return(gr) } -get_ranges_right <- function(gx, offset = OFFSET, offset2 = 10) { +get_ranges_right <- function(gx, offset = OFFSET, offset2 = 300) { E <- sapply(gx, function(x)max(x$end)) - max_offset <- sapply(gx, function(x)max(x$downstream_domain)) - E + offset2 + max_offset <- sapply(gx, function(x)max(x$downstream_domain)) - E + 10 offset_adjusted <- ifelse(max_offset < offset, max_offset, offset) gr <- GRanges(seqnames = sapply(gx, function(x)x$seqnames[1]), IRanges(start = E - offset2, end = E + offset_adjusted)) return(gr)
--- a/extract_putative_ltr.R Tue Jun 28 12:33:22 2022 +0000 +++ b/extract_putative_ltr.R Wed Jun 29 09:25:54 2022 +0000 @@ -77,6 +77,10 @@ g <- rtracklayer::import("/mnt/raid/users/petr/workspace/ltr_finder_test/test_data/DANTE_filtered_part.gff3") s <- readDNAStringSet("/mnt/raid/users/petr/workspace/ltr_finder_test/test_data/Rbp_part.fa") + # oriza + g <- rtracklayer::import("/mnt/raid/users/petr/workspace/dante_ltr/test_data/big_test_data/DANTE_full_oryza.gff3") + s <- readDNAStringSet("/mnt/raid/users/petr/workspace/dante_ltr/test_data/big_test_data/o_sativa_msu7.0.fasta") + g <- rtracklayer::import("/mnt/raid/users/petr/workspace/dante_ltr/test_data /DANTE_Vfaba_chr5.gff3") s <- readDNAStringSet("/mnt/ceph/454_data/Vicia_faba_assembly/assembly/ver_210910