Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate 'row.names' are not allowed #174

Open
SoniramDK opened this issue Aug 27, 2024 · 1 comment
Open

duplicate 'row.names' are not allowed #174

SoniramDK opened this issue Aug 27, 2024 · 1 comment

Comments

@SoniramDK
Copy link

SoniramDK commented Aug 27, 2024

Hello Ampvis2 people.

Im trying to use Ampvis2 inside ONT AmpSeq package, and I use my reads as an input, along with my metadata file that looks like this

SampleID,Group,Condition
bc92,Group A,Test 1
bc93,Group B,Test 2
bc94,Group C,Test 3
bc95,Group D,Test 4
bc96,Group E,Test 5

While the package is running, I get the following error:
Error in rule ampvis2_std_plots_sintax:
jobid: 53
input: results/final/99/OTUtable_tax_99_sintax.tsv
output: results/final/figs/99/Heatmap_99_sintax.png, results/final/figs/99/Rarefaction_99_sintax.png, results/final/figs/99/Ordination_99_sintax.png, results/final/figs/99/Boxplot_99_sintax.png, results/final/R-environment/99/R-environment_99_sintax.RData

Inside the log file I can see that the error has to do with the row names:

Loading required package: ggplot2
Warning messages:
1: package ‘ampvis2’ was built under R version 4.3.2
2: package ‘ggplot2’ was built under R version 4.3.3
Error in .rowNamesDF<-(x, value = value) :
duplicate 'row.names' are not allowed
Calls: amp_load ... row.names<- -> row.names<-.data.frame -> .rowNamesDF<-
In addition: Warning messages:
1: Could not find a column named OTU/ASV in otutable, using rownames as OTU ID's
2: non-unique values when setting 'row.names':
Execution halted

As I understand, the error has to do with the fact that the OTU column is not named as OTU, but inside my tsv file I can see that the column has the OTU name:

OTU bc92 bc93 bc94 bc95 bc96 kingdom phylum class order family genus species
OTU_1 0 0 1 0 0 k__Bacteria
OTU_10 0 0 0 1 0 k__Bacteria p__Firmicutes c__Clostridia o__Clostridiales >OTU_100 0 0 1 0 0 k__Bacteria
OTU_101 0 0 0 0 1 k__Bacteria p__Firmicutes c__Bacilli
OTU_102 0 0 1 0 0 k__Bacteria
OTU_103 0 0 0 0 1 k__Bacteria
OTU_104 0 0 0 0 1 k__Bacteria p__Firmicutes
OTU_105 1 0 0 0 0 k__Bacteria
OTU_106 1 0 0 0 0
OTU_107 0 1 0 0 0 k__Bacteria
OTU_108 0 1 0 0 0 k__Bacteria
OTU_109 0 0 1 0 0 k__Bacteria
OTU_11 0 0 0 0 1 k__Bacteria p__Firmicutes c__Clostridia o__Clostridiales >OTU_110 0 0 1 0 0 k__Bacteria
OTU_111 0 0 0 1 0 k__Bacteria
OTU_112 0 0 0 0 1 k__Bacteria
OTU_113 1 0 0 0 0 k__Bacteria
OTU_114 1 0 0 0 0 k__Bacteria p__Firmicutes
OTU_115 0 1 0 0 0 k__Bacteria
OTU_116 0 0 1 0 0 k__Bacteria
OTU_117 0 0 1 0 0 k__Bacteria
OTU_118 0 0 1 0 0 k__Bacteria
OTU_119 0 0 0 0 1 k__Bacteria p__Firmicutes c__Erysipelotrichia o__Erysipelotri>OTU_12 0 0 1 0 0 k__Bacteria

Also, checked for duplicates in the OTU names and did not find any.

Is there anybody that knows what might be the issue?

Kind regards,
SoniramDK

@KasperSkytte
Copy link
Owner

Hi. Please provide a reproducible example so that I can debug. But the error most likely refers to the sample ID's in the metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants