spholmes / F1000_workflow

43 stars 33 forks source link

Issue in Creating Phylogenetic tree #35

Open Joishy-T opened 4 years ago

Joishy-T commented 4 years ago

Hello, I am new in this field and having trouble in analysing my data. Can anyone please suggest me what exactly is wrong in creating tree. As m getting this error after 20th days :

fitGTR <- optim.pml(fitGTR, model="GTR", optInv=TRUE, optGamma=TRUE,

rearrangement = "stochastic", control = pml.control(trace = 0))

Error in optim(par = lbf, fn = fn, gr = NULL, method = "Nelder-Mead", : function cannot be evaluated at initial parameters In addition: There were 48 warnings (use warnings() to see them)

warnings() Warning messages: 1: In optimize(f = fn, interval = c(0.1, 500), lower = 0.1, ... : NA/Inf replaced by maximum positive value 2: In optimize(f = fn, interval = c(0.1, 500), lower = 0.1, ... : NA/Inf replaced by maximum positive value

Information about: A) Sequencing Library: We outsourced our samples where we amplified V3-V4 region using Illumina miseq platform using nexetra library preparation kit.
B) Size of the ASV table: are you talking about this? otu_table() OTU Table: [ 24226 taxa and 72 samples ] sample_data() Sample Data: [ 72 samples by 19 sample variables ] tax_table() Taxonomy Table: [ 24226 taxa by 6 taxonomic ranks ]

I am having trouble in making tree. Its getting killed. Please suggest.

spholmes commented 4 years ago

Joishy I would suggest making the tree outside of r using RaxML or a fast tree making algorithm as 25,000 taxa needs too much memory. Best Regards Susan

On Thu, Dec 26, 2019, 10:40 Joishy-T notifications@github.com wrote:

Hello, I am new in this field and having trouble in analysing my data. Can anyone please suggest me what exactly is wrong in creating tree. As m getting this error after 20th days :

fitGTR <- optim.pml(fitGTR, model="GTR", optInv=TRUE, optGamma=TRUE,

rearrangement = "stochastic", control = pml.control(trace = 0))

Error in optim(par = lbf, fn = fn, gr = NULL, method = "Nelder-Mead", : function cannot be evaluated at initial parameters In addition: There were 48 warnings (use warnings() to see them)

warnings() Warning messages: 1: In optimize(f = fn, interval = c(0.1, 500), lower = 0.1, ... : NA/Inf replaced by maximum positive value 2: In optimize(f = fn, interval = c(0.1, 500), lower = 0.1, ... : NA/Inf replaced by maximum positive value

Information about: A) Sequencing Library: We outsourced our samples where we amplified V3-V4 region using Illumina miseq platform using nexetra library preparation kit. B) Size of the ASV table: are you talking about this? otu_table() OTU Table: [ 24226 taxa and 72 samples ] sample_data() Sample Data: [ 72 samples by 19 sample variables ] tax_table() Taxonomy Table: [ 24226 taxa by 6 taxonomic ranks ]

I am having trouble in making tree. Its getting killed. Please suggest.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/spholmes/F1000_workflow/issues/35?email_source=notifications&email_token=AAJFZPKJJFNQXRYDDP3772DQ2Q4EBA5CNFSM4J7IHNKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICU44SA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJFZPOKDDBY2YND3M7V7H3Q2Q4EBANCNFSM4J7IHNKA .

Joishy-T commented 4 years ago

Dear Susan, Thank you so much for the suggestion. But do i have to install it in linux using link: http://www.microbesonline.org/fasttree/#Usage. Do we have any tutorials for using the same? How to go for it? And also do we need to use GTR model here for the downstream analysis as pyloseq pipeline use the same.

Regards Joishy

spholmes commented 4 years ago

I would follow the creators instructions in the manual here: (doesn't have to be linux) https://cme.h-its.org/exelixis/web/software/raxml/ There's a youtube video here: https://www.youtube.com/watch?v=4sRqS7MxHzc

best of luck, Susan

On Sun, Dec 29, 2019 at 9:53 PM Joishy-T notifications@github.com wrote:

Dear Susan, Thank you so much for the suggestion. But do i have to install it in linux using link: http://www.microbesonline.org/fasttree/#Usage. Do we have any tutorials for using the same? How to go for it? And also do we need to use GTR model here for the downstream analysis as pyloseq pipeline use the same.

Regards Joishy

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spholmes/F1000_workflow/issues/35?email_source=notifications&email_token=AAJFZPOWV36LYJTAQXLOYILQ3GEHLA5CNFSM4J7IHNKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHZUISQ#issuecomment-569590858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJFZPPB66PNPVRHW5AJUG3Q3GEHLANCNFSM4J7IHNKA .

-- Susan Holmes John Henry Samter Fellow in Undergraduate Education Professor, Statistics 2017-2018 CASBS Fellow, Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

Joishy-T commented 4 years ago

Dear Susan, Thank you so much. I will try that.

Regards Joishy

Joishy-T commented 4 years ago

Dear Susan, Sorry to bother you. As per your suggestion I could download RAXML. However, it needs msa file. can we use output of these command? alignment <- AlignSeqs(DNAStringSet(seqs), anchor=NA,verbose=FALSE) but again it is rds file So how m i going to use that in phloseq object?m confused.

spholmes commented 4 years ago

This is not a phyloseq problem, you need to output the msa using something like write.msa(x, file=NULL, format=ifelse((f <- guess.format.msa(file, method= "extension"))=="UNKNOWN", "FASTA", f), pretty.print=FALSE) (this is from the rphast) package but there are many ways of doing that.

Outside of R you make the tree then you read it in using read.tree from ape, then you input it into phyloseq.

On Mon, Dec 30, 2019 at 2:04 AM Joishy-T notifications@github.com wrote:

Dear Susan, Sorry to bother you. As per your suggestion I could download RAXML. However, it needs msa file. can we use output of these command? alignment <- AlignSeqs(DNAStringSet(seqs), anchor=NA,verbose=FALSE) but again it is rds file So how m i going to use that in phloseq object?m confused.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spholmes/F1000_workflow/issues/35?email_source=notifications&email_token=AAJFZPJNW4QJWKNIGVE4GALQ3HBTFA5CNFSM4J7IHNKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHZ6NIA#issuecomment-569632416, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJFZPM3ETJ2IN5CDWKRDH3Q3HBTFANCNFSM4J7IHNKA .

-- Susan Holmes John Henry Samter Fellow in Undergraduate Education Professor, Statistics 2017-2018 CASBS Fellow, Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/

Joishy-T commented 4 years ago

Dear susan, I tried it but getting this error:

a=readRDS("alignment.rds") write.msa(a, file=NULL, format=ifelse((f <- guess.format.msa(file, method= "extension"))=="UNKNOWN", "FASTA", f), pretty.print=FALSE) Error in filename[i] : object of type 'closure' is not subsettable

Tried both way by making rds as well as using "alignment" (output while making phyloseq)

Thank you so much for the help

Regards Tulsi

Joishy-T commented 4 years ago

Dear Susan, m getting same error. How should i fix it? Please suggest.

Regards Tulsi

yijingl941106 commented 4 years ago

Hi,

I have same problem when creating Phylogenetic tree:

fitGTR <- optim.pml(fitGTR, model="GTR", optInv=TRUE, optGamma=TRUE,

  • rearrangement = "stochastic", control = pml.control(trace = 0)) Error in optim(par = lbf, fn = fn, gr = NULL, method = "Nelder-Mead", : function cannot be evaluated at initial parameters In addition: There were 48 warnings (use warnings() to see them)

Size of the ASV table: otu_table() OTU Table: [ 5888 taxa and 39 samples ] sample_data() Sample Data: [ 39 samples by 52 sample variables ] tax_table() Taxonomy Table: [ 5888 taxa by 7 taxonomic ranks ]

I still want to make the tree in R, do you have any suggestions?

Thanks so much!

Yijing