I ran od -c pheno1.txt on the terminal and saw that the end of line is only \n. I'm going to try it later. For the moment, I modified my R script to create my file like this:
write.table(df.pheno,"~/Desktop/pheno1.txt",
quote = FALSE,
col.names = TRUE,
row.names = FALSE,
eol = "\r\n"). # This is the line of code that I needed to write to add the \r\n!
I've also change the encoding with TextWrangler.
On the PLINK website, it's saying this http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml:
Sex (1=male; 2=female; other=unknown)
"If an individual's sex is unknown, then any character other than 1 or 2 can be used."
The message I have is this one (returning only a log file and a nose file, even if I have a sex column, and trying with the no BOM file...):
plink --file output_in_plink --pheno pheno1.txt --out run2
@----------------------------------------------------------@
| PLINK! | v1.07 | 10/Aug/2009 |
|----------------------------------------------------------|
| (C) 2009 Shaun Purcell, GNU General Public License, v2 |
|----------------------------------------------------------|
| For documentation, citation & bug-report instructions: |
| http://pngu.mgh.harvard.edu/purcell/plink/ |
@----------------------------------------------------------@
Skipping web check... [ --noweb ]
Writing this text to log file [ run2.log ]
Analysis started:
Thu Dec 29 12:48:31 2016
Options in effect:
--noweb
--file output_in_plink
--pheno pheno1.txt
--out run2
840907 (of 840907) markers to be included from [ output_in_plink.map ]
Warning, found 96 individuals with ambiguous sex codes
These individuals will be set to missing ( or use --allow-no-sex )
Writing list of these individuals to [ run2.nosex ]
96 individuals read from [ output_in_plink.ped ]
0 individuals with nonmissing phenotypes
Assuming a disease phenotype (1=unaff, 2=aff, 0=miss)
Missing phenotype value is also -9
0 cases, 0 controls and 96 missing
0 males, 0 females, and 96 of unspecified sex
Reading alternate phenotype from [ pheno1.txt ]
0 individuals with non-missing alternate phenotype
Assuming a disease phenotype (1=unaff, 2=aff, 0=miss)
Missing phenotype value is also -9
0 cases, 0 controls and 96 missing
Before frequency and genotyping pruning, there are 840907 SNPs
96 founders and 0 non-founders found
Total genotyping rate in remaining individuals is 1
0 SNPs failed missingness test ( GENO > 1 )
0 SNPs failed frequency test ( MAF < 0 )
After frequency and genotyping pruning, there are 840907 SNPs
After filtering, 0 cases, 0 controls and 96 missing
After filtering, 0 males, 0 females, and 96 of unspecified sex
Analysis finished: Thu Dec 29 12:49:38 2016