Struggling with command line version input file

93 views
Skip to first unread message

Eloise Cave

unread,
Jan 18, 2025, 7:38:36 AMJan 18
to structure-software
Hello all, 
I am trying to run structure on the command line but it can't seem to read my input file correctly even if I have it formatted correctly. Briefly, I have the first row as marker names, first column as sample ID and columns 2-23 as presence/absence data. Essentially I am trying to run my data as AFLP format. I have my recessive alleles coded in a second row. I formatted this using excel on a mac computer and saved it as a tab delimited text file. I then read in the manual that this can be an issue so i used the dos2unix function but that did not seam to solve the issue. I have attached a screen shot of a small section of what my data looks like in excel. The error I get after trying to run structure states "WARNING! Probable error in the input file. Individual 1, locus 3; encountered the following data "B5" when expecting an integer" then this is repeated down with different individuals. It looks like it thinks that once it reaches locus 3 that it has moved on to the next line which and it is reading the sample id (B5) and not the data but this is not shown in my input file. My parameter file  setting are set like this:  
Basic program parameters
#define MAXPOPS      6
#define BURNIN       10000
#define NUMREPS      100000

Input file
#define INFILE      MHC_structure_2.txt

Data file format
#define NUMINDS      178
#define NUMLOCI      22
#define PLOIDY       2
#define MISSING      -9
#define ONEROWPERIND 0

#define LABEL        1
#define POPDATA      0
#define POPFLAG      0
#define LOCDATA      0
#define PHENOTYPE      0
#define EXTRACOLS      0
#define MARKERNAMES      1
#define RECESSIVEALLELES      1
#define MAPDISTANCES      0

Advanced data file options
#define PHASED         0
#define MARKOVPHASE      0
#define NOTAMBIGUOUS      -999 

I hope I described this enough but I was hoping someone can help me figure out why it saying my input file is incorrect. I have tried removing the sample and marker names and just having the data with no luck. I've attached a text file that I've tried using.  Please help! Thanks!
Screenshot 2025-01-17 at 11.47.29 PM.png
MHC_structure_2.txt

Mark Farman

unread,
Feb 14, 2025, 10:56:08 PMFeb 14
to structure-software
Don't pay any attention to the error message - there is often no correlation between the message and the actual problem in your data. All you can really interpret from the message is that there is something wrong with the dataset. The columns in your data look good, so the most likely problem is illegal newline characters. Possibly you opened your file in Excel or Pages and it inserted carriage returns instead of newlines.
Reply all
Reply to author
Forward
0 new messages