Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit d4d6295

Browse files
committed
Fixed bug in table processing for report
1 parent 0424c11 commit d4d6295

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

scripts/write_report.Rmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ primers <- snakemake@params[["primers"]]
5656

5757
* Run directory: `r workdir`
5858

59-
* Number of sequences in database: `r scan(nsequences)`
59+
* Number of sequences in database: `r scan(nsequences, what = "character")`
6060

61-
* Number of dereplicated sequences: `r scan(nderep)`
61+
* Number of dereplicated sequences: `r scan(nderep, what = "character")`
6262

63-
* Number of taxids in database: `r scan(ntaxids)`
63+
* Number of taxids in database: `r scan(ntaxids, what = "character")`
6464

65-
* Number of sequences filtered out because of too high N content: `r scan(nNfilt)`
65+
* Number of sequences filtered out because of too high N content: `r scan(nNfilt, what = "character")`
6666

6767
* Primers were trimmed before alignment: `r trimming`
6868

@@ -79,15 +79,15 @@ Pairwise comparison of sequences with less than `r identity*100`% identity was n
7979

8080
```{r distances}
8181
data_table <- read.csv(file = distanceTable, sep = '\t', check.names = FALSE)
82-
full_table <- data_table %>% rename (query = target, query_name = target_name, query_taxid = target_taxid,
83-
target = query, target_name = query_name, target_taxid = query_taxid) %>%
84-
bind_rows(data_table)
82+
inverted_table <- data_table %>% rename (query = target, query_name = target_name, query_taxid = target_taxid, query_relsize= target_relsize, query_size = target_size,
83+
target = query, target_name = query_name, target_taxid = query_taxid, target_size = query_size, target_relsize = query_relsize)
84+
full_table<- data_table %>% bind_rows(inverted_table)
8585
8686
datatable(full_table, filter = list(position = 'top'), rownames = FALSE, escape = FALSE,
8787
extensions= c("ColReorder", "Buttons"),
8888
selection = 'none',
8989
options = list(dom = 'BRrlftpi',
90-
autoWidth=FALSE,
90+
autoWidth=FALSE,
9191
scrollX = TRUE,
9292
lengthMenu = list(c(50, 100, 500, -1),
9393
c('50', '100', '500', 'All')),

0 commit comments

Comments
 (0)