Answers.Body: <p>Update
  Thanks to @RamRS for pointing out: the documentation that I quoted below is apparently a sort of inside joke (!) for the plink devs.</p>
  <p>It sounds like you might be able to use the flag <code>--allow-extra-chr</code> to support a draft genome:</p>
  <blockquote>
  <p>Contact us, and we'll send you a build supporting a higher autosome limit. Note that this isn't necessary if you're dealing with a draft assembly with lots of contigs, rather than actual autosomes—the standard build can handle that if you name your contigs 'contig1', 'contig2', etc. and use the --allow-extra-chr flag.&quot;</p>
  </blockquote>
  <hr />
  <p>Original answer</p>
  <p>As @gringer suggests, I think that the plink docs tell you what you need to know:</p>
  <blockquote>
  <p>--chr-set changes the chromosome set. The first parameter specifies the number of diploid autosome pairs if positive, or haploid chromosomes if negative. (Polyploid and aneuploid data are not supported, and there is currently no special handling of sex or mitochondrial chromosomes in all-haploid chromosome sets.)</p>
  <p>Given diploid autosomes, the remaining modifiers let you indicate the absence of specific non-autosomal chromosomes, as an extra sanity check on the input data. Note that, when there are n autosome pairs, the X chromosome is assigned numeric code n+1, Y is n+2, XY (pseudo-autosomal region of X) is n+3, and MT (mitochondria) is n+4.</p>
  <p><strong>n is currently limited to 95</strong>, so if you're working with adder's-tongue fern genomes, you're out of luck.</p>
  </blockquote>
  <p>I don't think that plink will work with your current assembly.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-26T19:25:27.613Z
Answers.Text: I had added a comment but it looks like it's disappeared somehow. The docs specify the "you're out of luck" as a joke. Read further: "Just kidding. Contact us, and we'll send you a build supporting a higher autosome limit. Note that this isn't necessary if you're dealing with a draft assembly with lots of contigs, rather than actual autosomes—the standard build can handle that if you name your contigs 'contig1', 'contig2', etc. and use the --allow-extra-chr flag."
Answers.UserDisplayName: Ram RS
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-26T22:17:48.480Z
Answers.Text: Thanks @RamRS. Apparently I should take my own advice on reading the docs! However I'm a little surprised that even as a joke they are misinforming the reader.
Answers.UserDisplayName: Maximilian Press
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-22T22:37:58.733Z
Answers.LastActivityDate: 2024-06-26T22:20:31.390Z
Answers.LastEditDate: 2024-06-26T22:20:31.390Z
Answers.UserDisplayName: Maximilian Press
Body: <p>I have run this and checked the .map for number of contigs and specified in the code <code>plink --file vcf_corrected --chr-set 897 --make-bed --out output_file</code> but keep getting the error below</p>
  <pre><code>PLINK v1.90b6.21 64-bit (19 Oct 2020)          www.cog-genomics.org/plink/1.9/
  (C) 2005-2020 Shaun Purcell, Christopher Chang   GNU General Public License v3
  Logging to file.log.
  Options in effect:
    --chr-set 897
    --file vcf_corrected
    --make-bed
    --out outputfile
  
  Error: Invalid --chr-set parameter '897'.
  For more information, try &quot;plink --help &lt;flag name&gt;&quot; or &quot;plink --help | more&quot;.
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-21T22:49:23.257Z
Comments.Text: Please provide more context around your question. Are you trying to use Plink on a draft genome assembly with 897 contigs?
Comments.UserDisplayName: gringer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-26T19:27:21.283Z
Comments.Text: @gringer: Any idea how my comment disappeared? Asking because you're a mod
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-26T23:04:56.210Z
Comments.Text: @RamRS answers should be written as answers, not comments. See [here](https://bioinformatics.stackexchange.com/help/privileges/comment).
Comments.UserDisplayName: gringer
Tags: <plink>
Title: Can't convert my vcf to plink
ThreadText: # Can't convert my vcf to plink
  
  (Asked by: username_0 on 2024-06-21)
  
  I have run this and checked the .map for number of contigs and specified in the code `plink --file vcf_corrected --chr-set 897 --make-bed --out output_file` but keep getting the error below
  
  ```
  PLINK v1.90b6.21 64-bit (19 Oct 2020)          www.cog-genomics.org/plink/1.9/
  (C) 2005-2020 Shaun Purcell, Christopher Chang   GNU General Public License v3
  Logging to file.log.
  Options in effect:
    --chr-set 897
    --file vcf_corrected
    --make-bed
    --out outputfile
  
  Error: Invalid --chr-set parameter '897'.
  For more information, try "plink --help <flag name>" or "plink --help | more".
  
  ```
  
  **Tags:** plink
  
  > **Comments:**
  > **username_1**: Please provide more context around your question. Are you trying to use Plink on a draft genome assembly with 897 contigs?  
  > **username_2**: @username_1: Any idea how my comment disappeared? Asking because you're a mod  
  > **username_1**: @username_2 answers should be written as answers, not comments. See [here](https://bioinformatics.stackexchange.com/help/privileges/comment).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2024-06-22. Score: 1
  
  Update
  Thanks to @username_2 for pointing out: the documentation that I quoted below is apparently a sort of inside joke (!) for the plink devs.
  
  It sounds like you might be able to use the flag `--allow-extra-chr` to support a draft genome:
  
  > Contact us, and we'll send you a build supporting a higher autosome limit. Note that this isn't necessary if you're dealing with a draft assembly with lots of contigs, rather than actual autosomes—the standard build can handle that if you name your contigs 'contig1', 'contig2', etc. and use the --allow-extra-chr flag."
  
  ---
  
  Original answer
  
  As @username_1 suggests, I think that the plink docs tell you what you need to know:
  
  > --chr-set changes the chromosome set. The first parameter specifies the number of diploid autosome pairs if positive, or haploid chromosomes if negative. (Polyploid and aneuploid data are not supported, and there is currently no special handling of sex or mitochondrial chromosomes in all-haploid chromosome sets.)
  >
  > Given diploid autosomes, the remaining modifiers let you indicate the absence of specific non-autosomal chromosomes, as an extra sanity check on the input data. Note that, when there are n autosome pairs, the X chromosome is assigned numeric code n+1, Y is n+2, XY (pseudo-autosomal region of X) is n+3, and MT (mitochondria) is n+4.
  >
  > **n is currently limited to 95**, so if you're working with adder's-tongue fern genomes, you're out of luck.
  
  I don't think that plink will work with your current assembly.
  
  > **Comments:**
  > **username_2**: I had added a comment but it looks like it's disappeared somehow. The docs specify the "you're out of luck" as a joke. Read further: "Just kidding. Contact us, and we'll send you a build supporting a higher autosome limit. Note that this isn't necessary if you're dealing with a draft assembly with lots of contigs, rather than actual autosomes—the standard build can handle that if you name your contigs 'contig1', 'contig2', etc. and use the --allow-extra-chr flag."  
  > **username_3**: Thanks @username_2. Apparently I should take my own advice on reading the docs! However I'm a little surprised that even as a joke they are misinforming the reader.  
  
  ---
  
  