Malformed population map help

127 views
Skip to first unread message

Anita Wray

unread,
Oct 5, 2021, 5:28:33 PM10/5/21
to Stacks
Hi, 

I run populations six separate times for my six different species. All of the population map .txt files were created at the same time, but one of the six keeps spitting out this error:

Error: Malformed population map -- expected 'SAMPLE \t POP [\t GROUP]'. In file '/home/awray/AwrayRockfish/scripts/copperpopmap.txt', line :
��C
Aborted.

Here is the populations code I ran: 
#Copper
stacks populations -P $DATADIR -M $POPMAP/copperpopmap.txt -O $OUTPUT/copper -R 0.20 --vcf --genepop --structure

I have attached my .txt file as well. Any and all help would be greatly appreciated! 

Thanks, 
Anita

copperpopmap.txt

Catchen, Julian

unread,
Oct 5, 2021, 5:36:05 PM10/5/21
to stacks...@googlegroups.com

Hi Anita,

 

Your population map has some weird, non-text encoding. If I look at the encoding I see the following:

 

% head copperpopmap.txt 

??CO0001_minq20_sorted  WC

CO0002_minq20_sorted    WC

CO0003_minq20_sorted    WC

CO0004_minq20_sorted    NPS

CO0005_minq20_sorted    WC

CO0006_minq20_sorted    WC

CO0007_minq20_sorted    WC

CO0008_minq20_sorted    WC

CO0009_minq20_sorted    WC

CO0010_minq20_sorted    NPS

 

% head copperpopmap.txt | od -c

0000000 377 376   C  \0   O  \0   0  \0   0  \0   0  \0   1  \0   _  \0

0000020   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0   s  \0

0000040   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   W  \0   C  \0

0000060  \n  \0   C  \0   O  \0   0  \0   0  \0   0  \0   2  \0   _  \0

0000100   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0   s  \0

0000120   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   W  \0   C  \0

0000140  \n  \0   C  \0   O  \0   0  \0   0  \0   0  \0   3  \0   _  \0

0000160   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0   s  \0

0000200   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   W  \0   C  \0

0000220  \n  \0   C  \0   O  \0   0  \0   0  \0   0  \0   4  \0   _  \0

0000240   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0   s  \0

0000260   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   N  \0   P  \0

0000300   S  \0  \n  \0   C  \0   O  \0   0  \0   0  \0   0  \0   5  \0

0000320   _  \0   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0

0000340   s  \0   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   W  \0

0000360   C  \0  \n  \0   C  \0   O  \0   0  \0   0  \0   0  \0   6  \0

0000400   _  \0   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0

0000420   s  \0   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   W  \0

0000440   C  \0  \n  \0   C  \0   O  \0   0  \0   0  \0   0  \0   7  \0

0000460   _  \0   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0

0000500   s  \0   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   W  \0

0000520   C  \0  \n  \0   C  \0   O  \0   0  \0   0  \0   0  \0   8  \0

0000540   _  \0   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0

0000560   s  \0   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   W  \0

0000600   C  \0  \n  \0   C  \0   O  \0   0  \0   0  \0   0  \0   9  \0

0000620   _  \0   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0

0000640   s  \0   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   W  \0

0000660   C  \0  \n  \0   C  \0   O  \0   0  \0   0  \0   1  \0   0  \0

0000700   _  \0   m  \0   i  \0   n  \0   q  \0   2  \0   0  \0   _  \0

0000720   s  \0   o  \0   r  \0   t  \0   e  \0   d  \0  \t  \0   N  \0

0000740   P  \0   S  \0  \n

0000745

 

Octal dump (od -c) displays the numerical encoding of the text and this file is not plain text. Note the file starts with characters 377 and 376, which do not have a text encoding, and then all the embedded NULL characters (“\0”). I assume this is some kind of Unicode encoding that you saved from a word processor or similar. Remake the file with a plain text editor or on the UNIX command line, say using the nano program.

 

Best,

 

julian

Anita Wray

unread,
Oct 5, 2021, 6:02:43 PM10/5/21
to Stacks
This worked.  Thank you Julian! 
Reply all
Reply to author
Forward
0 new messages