individual metafile metadata: "no id column"

80 views
Skip to first unread message

Mariana Augsten

unread,
Apr 4, 2022, 11:07:35 AM4/4/22
to dartR
Hi everyone.
I`m a new user to this DartR package. I`m so happy that it exists, I believe it will help me a lot.
Getting to the point: Trying to create my genlight object :
gl <- gl.read.dart("Report_DTb21-6643_SNP_2.csv", ind.metafile = "metadata backup.csv")

I get this message:

Adding individual metrics: metadata backup.csv .
Error in utils.dart2genlight(dout, ind.metafile = ind.metafile, probar = probar,  :
  Fatal Error: There is no id column

But I can garantee you my file has a id column, the first one, including I`ve checked that it is just the same as my SNP csv file. I`ve changed the table in so many ways, adding columns, excluding columns, only letting id and pop columns.. I dont know what else to do.

Any ideia what could be happening?
Regards, 

Mariana

Jose Luis Mijangos

unread,
Apr 4, 2022, 7:14:38 PM4/4/22
to dartR
Hi Mariana,

Maybe you don't have the latest version of dartR. Also you can check how an individual metadata file looks like. Can you try the following code:

# Install the latest version of dartR (v2)
install.packages("dartR")
library(dartR)
# check how the individual metadata file should look like
test_csv <- read.csv(system.file('extdata','testset_metadata.csv', package='dartR'))
test_csv
# read files
dartfile <- system.file('extdata','testset_SNPs_2Row.csv', package='dartR')
metadata <- system.file('extdata','testset_metadata.csv', package='dartR')

gl <- gl.read.dart(dartfile, ind.metafile = metadata, probar=TRUE)

Cheers,
Luis

Peter Unmack

unread,
Apr 6, 2022, 9:30:30 AM4/6/22
to da...@googlegroups.com
occasionally there is a weird quirk where a csv file which has the term
"id" in the first cell gets treated by excel as a different file type.

See https://www.journeybytes.com/fix-csv-sylk-error-in-excel/

Double check in a plain text editor that there isn't anything else
unexpected in the file and/or copy and paste it to a new text file and
save it, rename it as csv and see if that works.

I seem to recall having this problem once in the past.

Cheers
Peter



On 5/04/2022 1:07 am, Mariana Augsten wrote:
> Hi everyone.
> I`m a new user to this DartR package. I`m so happy that it exists, I
> believe it will help me a lot.
> Getting to the point: Trying to create my genlight object :
> gl <- gl.read.dart("Report_DTb21-6643_SNP_2.csv", ind.metafile =
> "metadata backup.csv")
>
> I get this message:
>
> Adding individual metrics: metadata backup.csv .
> Error in utils.dart2genlight(dout, ind.metafile = ind.metafile, probar =
> probar,  :
>   Fatal Error: There is no id column
>
> But I can garantee you my file has a id column, the first one, including
> I`ve checked that it is just the same as my SNP csv file. I`ve changed
> the table in so many ways, adding columns, excluding columns, only
> letting id and pop columns.. I dont know what else to do.
>
> Any ideia what could be happening?
> Regards,
>
> Mariana
>
> --
> You received this message because you are subscribed to the Google
> Groups "dartR" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to dartr+un...@googlegroups.com
> <mailto:dartr+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dartr/f8f7b318-4d82-40d8-9769-4182533a2808n%40googlegroups.com
> <https://groups.google.com/d/msgid/dartr/f8f7b318-4d82-40d8-9769-4182533a2808n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Brianna Coulter

unread,
Nov 24, 2022, 8:44:28 PM11/24/22
to dartR
Thank you Peter,

I was suddenly getting this problem out of nowhere. Relocated my 'id' column to the last column and it worked.

Bernd.Gruber

unread,
Nov 25, 2022, 12:52:05 AM11/25/22
to da...@googlegroups.com

Hi

 

I saw this behaviour when you save (by mistake) the excel as an utf-8 csv (not a pure csv file). Then the first character in the csv file gets replaced by some funky character.

 

 

Maybe that is the issue here…

 

Cheers,Bernd

 

 

 

==============================================================================

Dr Bernd Gruber                                              )/_         

                                                         _.--..---"-,--c_    

Professor Ecological Modelling                      \|..'           ._O__)_     

Tel: (02) 6206 3804                         ,=.    _.+   _ \..--( /          

Fax: (02) 6201 2328                           \\.-''_.-' \ (     \_          

Institute for Applied Ecology                  `'''       `\__   /\          

Faculty of Science and Technology                          ')                

University of Canberra   ACT 2601 AUSTRALIA

Email: bernd....@canberra.edu.au

WWW: bernd-gruber

 

Australian Government Higher Education Provider Number CRICOS #00212K 

NOTICE & DISCLAIMER: This email and any files transmitted with it may contain
confidential or copyright material and are for the attention of the addressee
only. If you have received this email in error please notify us by email
reply and delete it from your system. The University of Canberra accepts
no liability for any damage caused by any virus transmitted by this email.

==============================================================================

To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/db8932db-bfc1-4521-be5b-72c5f5da3bd9n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages