zeeev / vcflib

a simple C++ library for parsing and manipulating VCF files, + many command-line utilities
https://github.com/ekg/vcflib#vcflib
MIT License
19 stars 6 forks source link

Issues running pFST #12

Open uod12345 opened 4 years ago

uod12345 commented 4 years ago

Hi Zev, I'm trying to run pFST using your GPAT++ tool. It mentions using a comma separated list of inidividuals corresponding to the VCF file. I have more than 6000 individuals in mine. Is there a shorter way to do so? Something like {0:6000}? Do let me know.

zeeev commented 4 years ago

Hi @uod12345,

At this time there isn't a way shorthand way to do it. You'll probably hit a character limit on the command line.

If you're comfortable with cpp, I'd suggest changing this function:

https://github.com/vcflib/vcflib/blob/master/src/pFst.cpp#L58

uod12345 commented 4 years ago

Hi Zev,

I'm sorry, I'm not familiar with cpp; do I change it this way:

void loadIndices(map<int, int> & index, string set) > void loadIndices(map< 1, 6000> & index, string set) ? # Include the numbers instead of int?

Also, I came across a blog post which gives a solution in this link :

https://www.biostars.org/p/305937/

I have not tried it yet. Do you think this will work?

Thank you for your reply.

Regards.

On Mon, 27 Jul 2020 at 16:22, Zev Kronenberg notifications@github.com wrote:

Hi @uod12345 https://github.com/uod12345,

At this time there isn't a way shorthand way to do it. You'll probably hit a character limit on the command line.

If you're comfortable with cpp, I'd suggest changing this function:

https://github.com/vcflib/vcflib/blob/master/src/pFst.cpp#L58

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zeeev/vcflib/issues/12#issuecomment-664462248, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANJBUFZIZ6B7O5WSOTJV4ADR5WLU5ANCNFSM4PG7YKUQ .

zeeev commented 4 years ago

Yes, something like that will work. I use to do something like $(perl -e 'print join ",", (0..100)')

uod12345 commented 4 years ago

Thank you Zev! Will try these out.

Regards.

On Tue, 28 Jul 2020 at 22:41, Zev Kronenberg notifications@github.com wrote:

Yes, something like that will work. I use to do something like $(perl -e 'print join ",", (0..100)')

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zeeev/vcflib/issues/12#issuecomment-665298333, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANJBUFZ24GKY4VSCKKX6BTLR55AZPANCNFSM4PG7YKUQ .

zeeev commented 4 years ago

Chances are you'll max out the binomial with 6000+ samples. Consider downsampling or using wcFst.

On Wed, Jul 29, 2020 at 9:00 AM uod12345 notifications@github.com wrote:

Thank you Zev! Will try these out.

Regards.

On Tue, 28 Jul 2020 at 22:41, Zev Kronenberg notifications@github.com wrote:

Yes, something like that will work. I use to do something like $(perl -e 'print join ",", (0..100)')

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zeeev/vcflib/issues/12#issuecomment-665298333, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ANJBUFZ24GKY4VSCKKX6BTLR55AZPANCNFSM4PG7YKUQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zeeev/vcflib/issues/12#issuecomment-665717156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE7CIIHET4QR2472SSBPMDR6A2RXANCNFSM4PG7YKUQ .

uod12345 commented 4 years ago

I have used wcFST to calculate FST on vcftools/plink. I wanted to use GPAT++ to calculate P-values for those. I'm not sure of the effects of downsampling. Will give it a shot.

On Wed, 29 Jul 2020 at 16:02, Zev Kronenberg notifications@github.com wrote:

Chances are you'll max out the binomial with 6000+ samples. Consider downsampling or using wcFst.

On Wed, Jul 29, 2020 at 9:00 AM uod12345 notifications@github.com wrote:

Thank you Zev! Will try these out.

Regards.

On Tue, 28 Jul 2020 at 22:41, Zev Kronenberg notifications@github.com wrote:

Yes, something like that will work. I use to do something like $(perl -e 'print join ",", (0..100)')

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zeeev/vcflib/issues/12#issuecomment-665298333, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ANJBUFZ24GKY4VSCKKX6BTLR55AZPANCNFSM4PG7YKUQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zeeev/vcflib/issues/12#issuecomment-665717156, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAE7CIIHET4QR2472SSBPMDR6A2RXANCNFSM4PG7YKUQ

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zeeev/vcflib/issues/12#issuecomment-665718170, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANJBUFYOHPNII53M3QHCBFLR6A2YLANCNFSM4PG7YKUQ .