Git Product home page Git Product logo

Comments (7)

simonhmartin avatar simonhmartin commented on July 30, 2024 1

Yes, this is a problem with your vcf, which includes incorrect formatting for some sites. You can add the option --ploidyMismatchToMissing to set these sites to missing data.
In general, please remember that you can type parseVCF.py -h to see all the available options.

from genomics_general.

simonhmartin avatar simonhmartin commented on July 30, 2024

Hi,
You can specify the ploidy in a file (first column sample ID, second column ploidy). Add the option --ploidyFile ploidy_file.txt

If you get errors, please post the error here so I can help diagnose it.

Simon

from genomics_general.

wangjie07070910 avatar wangjie07070910 commented on July 30, 2024

Hi Simon,

Many thanks for your help, but I still encounter the error: parseVCF.py: error: argument --ploidy: invalid int value: 'ploidy_female.txt'. I presume that the content of my ploidy.txt file was not in the right format. The contents of my ploidy.txt file are as follows:
sample ID ploidy
Sample_1 2
Sample_2 4
Sample_3 4

Thanks again,
Jie

from genomics_general.

simonhmartin avatar simonhmartin commented on July 30, 2024

If all of your individuals are tetraploid, you can use
--ploidy 4

If some of your individuals are diploid and some are tetraploid, use:
--ploidyFile ploidy_file.txt

from genomics_general.

wangjie07070910 avatar wangjie07070910 commented on July 30, 2024

Thanks again.

I used --ploidyFile ploidy_file.txt, and The contents of my ploidy.txt file are as follows:

sample_ID ploidy
Sample_1 2
Sample_2 4
Sample_3 4

Then I got error:
ValueError: invalid literal for int() with base 10: 'ploidy'

Also, I tried the ploidy_file.txt file without the table header:

Sample_1 2
Sample_2 4
Sample_3 4

Then I got error:
IndexError: list index out of range

from genomics_general.

simonhmartin avatar simonhmartin commented on July 30, 2024

Please check your ploidy file for empty lines. It sounds like the script is trying to read a line in the file that has no data in it.

from genomics_general.

wangjie07070910 avatar wangjie07070910 commented on July 30, 2024

Thanks again. When I try to set my ploidy.txt file in the following format(When I turned 'ploidy' in the second column of the first row into a number), it worked

sample_ID 2
Sample_1 2
Sample_2 4
Sample_3 4

and I don't know if it has an effect. Besides, I'm having a new problem.

Error:Sample Sample_2 at Scaffold_1:1 genotype ./././. does not match explected ploidy of 2 (appears when I set Sample_2 to be a 2x.)
Error:Sample Sample_2 at Scaffold_2:25 genotype ./. does not match explected ploidy of 4 (appears when I set Sample_2 to be a 4x.)

I know it's supposed to be a problem with my sample (it's supposed to be tetraploid), but I'm putting it here and I would appreciate if you could give your opinion. How should I preprocess a sample like this.

from genomics_general.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.