Bacterial GWAS analysis?
2
2
Entering edit mode
9.6 years ago
SemiQuant ▴ 100

Hi

Can anyone recommend some software or and R package that will allow me to do GWAS analysis on bacteria? Specifically, M. tuberculosis. My main objective is to identify any mutations associated with drug resistance in my strain collection.

Thanks

genome gwas bacteria • 5.5k views
ADD COMMENT
1
Entering edit mode

Have a look at this recent review for some suggestions

ADD REPLY
0
Entering edit mode

Thanks. From what I've read about Plink its not really geared for haploid or very clonal populations. There were some great papers in the references I'll check out though.

ADD REPLY
0
Entering edit mode

Do you have multiple bacterial pools per phenotype?

ADD REPLY
0
Entering edit mode

Hi Zev, yes, I have numerous pools of about 50 isolates per phernotype

ADD REPLY
0
Entering edit mode

Please let me know if you have gotten any answer for this question. My email: ragavishn@gmail.com

ADD REPLY
3
Entering edit mode
9.6 years ago

I wrote a tool that can do association testing for binary traits: https://github.com/jewmanchue/vcflib/wiki/Association-testing-with-GPAT

We have been using it on bacterial samples where we have multiple bacterial pools for each phenotype.

Here is a command that would work for you:

pfst --file your.vcf --type PO --target 0,1,2,3 --background 4,5,6 > out.txt

type: PO means that the genotype calls in the VCF file are for pooled data.

target: The zero based index for one phenotypic group (1,2,3,4 genotype columns)

ADD COMMENT
0
Entering edit mode

Nice one. Is it applicable to see GWAS among a clonal group of bacterial data set.

ADD REPLY
0
Entering edit mode

The test was specifically designed for bacterial datasets.

ADD REPLY
0
Entering edit mode

Hi I saw your tool its looks nice to me. Could you please let me know what do you mean the target and background its little confused for me and what are those number.

ADD REPLY
0
Entering edit mode

The numbers correspond to the genotype columns in the VCF file. Target (cases) and controls (background) are the groups of individuals you want to compare.

ADD REPLY
0
Entering edit mode

Hi,

Thanks but I cant seem to compile the code on my mac. I keep getting an error

clang: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated

I attempted to edit the make file to set CXX = g++ -x "c" but it didn't help. Not really sure what to do, any insight would be appreciated.

ADD REPLY
0
Entering edit mode

Can you please provide the full error message?

ADD REPLY
0
Entering edit mode

Not sure what I did but I'm getting a different error message now (I updated my xtools yesterday). I installed it on a linux computer so ill give it a try on that. Thanks.

GOD:vcflib jdlim$ make
cd tabixpp && /Applications/Xcode.app/Contents/Developer/usr/bin/make
ar -cru libtabix.a
ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
    ar -m [-TLsv] archive file ...
    ar -m [-abiTLsv] position archive file ...
    ar -p [-TLsv] archive [file ...]
    ar -q [-cTLsv] archive file ...
    ar -r [-cuTLsv] archive file ...
    ar -r [-abciuTLsv] position archive file ...
    ar -t [-TLsv] archive [file ...]
    ar -x [-ouTLsv] archive [file ...]
make[2]: *** [libtabix.a] Error 1
make[1]: *** [all-recur] Error 1
make: *** [tabixpp/tabix.o] Error 2
ADD REPLY
0
Entering edit mode

Hi Zev

I am getting an error when trying to install on a linux computer as well.

cd tabixpp && make
make[1]: Entering directory `/home/lmbjas002/bin/vcflib/tabixpp'
make[2]: Entering directory `/home/lmbjas002/bin/vcflib/tabixpp'
gcc -c -g -Wall -O2 -fPIC  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE  bgzf.c -o bgzf.o
gcc -c -g -Wall -O2 -fPIC  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE  kstring.c -o kstring.o
gcc -c -g -Wall -O2 -fPIC  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE  knetfile.c -o knetfile.o
gcc -c -g -Wall -O2 -fPIC  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE  index.c -o index.o
gcc -c -g -Wall -O2 -fPIC  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE  bedidx.c -o bedidx.o
ar -cru libtabix.a bgzf.o kstring.o knetfile.o index.o bedidx.o
ranlib libtabix.a
gcc -c -g -Wall -O2 -fPIC  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE  main.c -o main.o
gcc -g -Wall -O2 -fPIC  -o tabix main.o -lm  -L. -ltabix -lz
gcc -c -g -Wall -O2 -fPIC  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE  bgzip.c -o bgzip.o
gcc -g -Wall -O2 -fPIC  -o bgzip bgzip.o bgzf.o knetfile.o -lz
g++ -g -Wall -O2 -fPIC  -c tabix.cpp
g++ -g -Wall -O2 -fPIC  -o tabix++ main.cpp tabix.o bgzf.o -lm  -L. -ltabix -lz
make[2]: Leaving directory `/home/lmbjas002/bin/vcflib/tabixpp'
make[1]: Leaving directory `/home/lmbjas002/bin/vcflib/tabixpp'
g++ -c -o src/Variant.o src/Variant.cpp -I. -L. -Ltabixpp/ -ltabix -lz -lm  -O3 -D_FILE_OFFSET_BITS=64 -std=c++0x
g++ -c -o src/rnglib.o src/rnglib.cpp -I. -L. -Ltabixpp/ -ltabix -lz -lm  -O3 -D_FILE_OFFSET_BITS=64 -std=c++0x
g++ -c -o src/var.o src/var.cpp -I. -L. -Ltabixpp/ -ltabix -lz -lm  -O3 -D_FILE_OFFSET_BITS=64 -std=c++0x
g++ -c -o src/pdflib.o src/pdflib.cpp -I. -L. -Ltabixpp/ -ltabix -lz -lm  -O3 -D_FILE_OFFSET_BITS=64 -std=c++0x
g++ -c -o src/cdflib.o src/cdflib.cpp -I. -L. -Ltabixpp/ -ltabix -lz -lm  -O3 -D_FILE_OFFSET_BITS=64 -std=c++0x
g++ -c -o src/split.o src/split.cpp -I. -L. -Ltabixpp/ -ltabix -lz -lm  -O3 -D_FILE_OFFSET_BITS=64 -std=c++0x
cd smithwaterman && make
make[1]: Entering directory `/home/lmbjas002/bin/vcflib/smithwaterman'
g++    -c -o smithwaterman.o smithwaterman.cpp
g++    -c -o BandedSmithWaterman.o BandedSmithWaterman.cpp
g++    -c -o SmithWatermanGotoh.o SmithWatermanGotoh.cpp
g++    -c -o Repeats.o Repeats.cpp
g++    -c -o LeftAlign.o LeftAlign.cpp
g++    -c -o IndelAllele.o IndelAllele.cpp
cc -Wall -O3   -c -o disorder.o disorder.c
  * linking smithwaterman
make[1]: Leaving directory `/home/lmbjas002/bin/vcflib/smithwaterman'
cd fastahack && make
make[1]: Entering directory `/home/lmbjas002/bin/vcflib/fastahack'
g++ -O3 -D_FILE_OFFSET_BITS=64 -c Fasta.cpp
g++ -O3 -D_FILE_OFFSET_BITS=64 -c split.cpp
g++ -O3 -D_FILE_OFFSET_BITS=64 -c disorder.c
g++ -O3 -D_FILE_OFFSET_BITS=64 Fasta.o FastaHack.cpp split.o disorder.o -o fastahack
make[1]: Leaving directory `/home/lmbjas002/bin/vcflib/fastahack'
cc    -c -o src/ssw.o src/ssw.c
g++ -O3 -D_FILE_OFFSET_BITS=64 -std=c++0x   -c -o src/ssw_cpp.o src/ssw_cpp.cpp
cd fsom && g++ -O3 -D_FILE_OFFSET_BITS=64 -std=c++0x -c fsom.c -lm
In file included from fsom.c:21:
fsom.h:77: error: non-local function 'void som_network_destroy(som_network_t*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.h:78: error: non-local function 'void som_set_inputs(som_network_t*, double*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.h:79: error: non-local function 'void som_train(som_network_t*, double**, size_t, size_t)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.h:80: error: non-local function 'void som_serialize(som_network_t*, const char*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.h:81: error: non-local function 'void som_init_weights(som_network_t*, double**, size_t)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.h:82: error: non-local function 'double som_get_best_neuron_coordinates(som_network_t*, size_t*, size_t*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.h:83: error: non-local function 'som_network_t* som_deserialize(const char*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.h:84: error: non-local function 'som_network_t* som_network_new(size_t, size_t, size_t)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.c:249: error: non-local function 'som_network_t* som_network_new(size_t, size_t, size_t)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.c:397: error: non-local function 'void som_network_destroy(som_network_t*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.c:417: error: non-local function 'void som_set_inputs(som_network_t*, double*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.c:436: error: non-local function 'double som_get_best_neuron_coordinates(som_network_t*, size_t*, size_t*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.c:560: error: non-local function 'double som_learning_rate_fast(som_network_t*, size_t, double, size_t)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.c:616: error: non-local function 'void som_init_weights(som_network_t*, double**, size_t)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.c:859: error: non-local function 'void som_train(som_network_t*, double**, size_t, size_t)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.c:887: error: non-local function 'void som_serialize(som_network_t*, const char*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
fsom.c:927: error: non-local function 'som_network_t* som_deserialize(const char*)' uses anonymous type
fsom.h:75: error: 'typedef struct<anonymous> som_network_t' does not refer to the unqualified type, so it is not used for linkage
make: *** [fsom/fsom.o] Error 1
ADD REPLY
1
Entering edit mode

And this is the error on my mac

1 warning generated.
c++    -c -o IndelAllele.o IndelAllele.cpp
cc -Wall -O3   -c -o disorder.o disorder.c
  * linking smithwaterman
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
ld: warning: option -s is obsolete and being ignored
ld: internal error: atom not found in symbolIndex(__ZNKSt3__16vectorINS_4pairIicEENS_9allocatorIS2_EEE8max_sizeEv) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [smithwaterman] Error 1
make: *** [smithwaterman/SmithWatermanGotoh.o] Error 2
ADD REPLY
0
Entering edit mode

ScienceBuff & ragavishn Can you please open a bug report on the repository so I can track this issue? Also did you pull recursively: git clone --recursive https://github.com/jewmanchue/vcflib.git

ADD REPLY
2
Entering edit mode
6.3 years ago
predeus ★ 2.1k

Here's a nice review that mentions many important papers in bacterial GWAS, and does a pretty good job explaining the difference between human GWAS and various attempts to do this in bacteria.

https://figshare.com/articles/The_background_of_bacterial_GWAS/5550037

ADD COMMENT
0
Entering edit mode

Thanks, this appears to be a comprehensive review.

ADD REPLY

Login before adding your answer.

Traffic: 2168 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6