Danko-Lab / TED

a fully Bayesian approach to deconvolve tumor microenvironment
60 stars 10 forks source link

vst transformation is feasible, but failed executing the next command #15

Open emkahuda opened 2 years ago

emkahuda commented 2 years ago

I have some different types of data (real data, semisynthetic data, and fully synthetic data generated using splatter software). When running the data and got the message "every gene has at least one zero. vst transformation is NOT feasible”, the running process is successful. However, when running different data and got the message "vst transformation is feasible" the execution failed (running process failed). The error message is

  1. "Error in vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) : less than 'nsub' rows with mean normalized count > 5, it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few genes are used

    What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip

tinyi commented 2 years ago

Hi Moh,

Thank you for your question. This seems to be caused by the sparsity of your simulated data. If you run vst (from the DEseq2 package) on your dataset, it gives the same error, which means that there are less than 'nsub'(nsub=1000) rows with mean normalized count > 5.

I added an argument of if.vst in the run.Ted function, to allow you to bypass the vst step. Simply set if.vst=FALSE, to disable vst.

Let me know if there are any questions.

Best,

Tinyi

On Sat, Jan 15, 2022 at 7:30 PM Moh Huda @.***> wrote:

I have some different types of data (real data, semisynthetic data, and fully synthetic data generated using splatter software). When running the data and got the message "every gene has at least one zero. vst transformation is NOT feasible”, the running process is successful. However, when running different data and got the message "vst transformation is feasible" the execution failed (running process failed). The error message is

  1. "Error in vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) : less than 'nsub' rows with mean normalized count > 5, it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few genes are used

    What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS26BBA42WZU3PR72NDUWIGTVANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

emkahuda commented 2 years ago

Dear Tinyi,

I want to confirm that the line I need to modify is line 335 from if(if.vst){ becoming if(if.vst=FALSE){

Is that all? Thank you very much for your help and reply.

Best regards,

Huda

On Mon, 17 Jan 2022, 07:40 Tinyi Chu, @.***> wrote:

Hi Moh,

Thank you for your question. This seems to be caused by the sparsity of your simulated data. If you run vst (from the DEseq2 package) on your dataset, it gives the same error, which means that there are less than 'nsub'(nsub=1000) rows with mean normalized count > 5.

I added an argument of if.vst in the run.Ted function, to allow you to bypass the vst step. Simply set if.vst=FALSE, to disable vst.

Let me know if there are any questions.

Best,

Tinyi

On Sat, Jan 15, 2022 at 7:30 PM Moh Huda @.***> wrote:

I have some different types of data (real data, semisynthetic data, and fully synthetic data generated using splatter software). When running the data and got the message "every gene has at least one zero. vst transformation is NOT feasible”, the running process is successful. However, when running different data and got the message "vst transformation is feasible" the execution failed (running process failed). The error message is

  1. "Error in vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) : less than 'nsub' rows with mean normalized count > 5, it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few genes are used

    What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB4NHS26BBA42WZU3PR72NDUWIGTVANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNZHWZ6PLNPI3O6G2XEEM3UWPBXTANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

tinyi commented 2 years ago

Hi Huda,

No, you do not need to change the code. You only need to re-install the updated package, and put if.vst=FALSE in the function argument.

Best,

Tinyi

On Mon, Jan 17, 2022 at 8:00 AM Moh Huda @.***> wrote:

Dear Tinyi,

I want to confirm that the line I need to modify is line 335 from if(if.vst){ becoming if(if.vst=FALSE){

Is that all? Thank you very much for your help and reply.

Best regards,

Huda

On Mon, 17 Jan 2022, 07:40 Tinyi Chu, @.***> wrote:

Hi Moh,

Thank you for your question. This seems to be caused by the sparsity of your simulated data. If you run vst (from the DEseq2 package) on your dataset, it gives the same error, which means that there are less than 'nsub'(nsub=1000) rows with mean normalized count > 5.

I added an argument of if.vst in the run.Ted function, to allow you to bypass the vst step. Simply set if.vst=FALSE, to disable vst.

Let me know if there are any questions.

Best,

Tinyi

On Sat, Jan 15, 2022 at 7:30 PM Moh Huda @.***> wrote:

I have some different types of data (real data, semisynthetic data, and fully synthetic data generated using splatter software). When running the data and got the message "every gene has at least one zero. vst transformation is NOT feasible”, the running process is successful. However, when running different data and got the message "vst transformation is feasible" the execution failed (running process failed). The error message is

  1. "Error in vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) : less than 'nsub' rows with mean normalized count > 5, it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few genes are used

    What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHWZ6PLNPI3O6G2XEEM3UWPBXTANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHSYRHABU4B3KQD5TIL3UWQHFBANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

emkahuda commented 2 years ago

Dear Tinyi,

I am currently using the RStudio server and the last time I installed BayesPrism it was quite difficult and I need the admin help to resolve the issue.

Could you please direct me to the updated version if possible?

When you said "put if.vst=FALSE in the function argument", you mean the function run.Ted(..., if.vst=FALSE)?

I am sorry I am really bad at programming. Thank you for your help and patience.

Regards,

Huda

On Mon, 17 Jan 2022, 18:21 Tinyi Chu, @.***> wrote:

Hi Huda,

No, you do not need to change the code. You only need to re-install the updated package, and put if.vst=FALSE in the function argument.

Best,

Tinyi

On Mon, Jan 17, 2022 at 8:00 AM Moh Huda @.***> wrote:

Dear Tinyi,

I want to confirm that the line I need to modify is line 335 from if(if.vst){ becoming if(if.vst=FALSE){

Is that all? Thank you very much for your help and reply.

Best regards,

Huda

On Mon, 17 Jan 2022, 07:40 Tinyi Chu, @.***> wrote:

Hi Moh,

Thank you for your question. This seems to be caused by the sparsity of your simulated data. If you run vst (from the DEseq2 package) on your dataset, it gives the same error, which means that there are less than 'nsub'(nsub=1000) rows with mean normalized count > 5.

I added an argument of if.vst in the run.Ted function, to allow you to bypass the vst step. Simply set if.vst=FALSE, to disable vst.

Let me know if there are any questions.

Best,

Tinyi

On Sat, Jan 15, 2022 at 7:30 PM Moh Huda @.***> wrote:

I have some different types of data (real data, semisynthetic data, and fully synthetic data generated using splatter software). When running the data and got the message "every gene has at least one zero. vst transformation is NOT feasible”, the running process is successful. However, when running different data and got the message "vst transformation is feasible" the execution failed (running process failed). The error message is

  1. "Error in vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) : less than 'nsub' rows with mean normalized count > 5, it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few genes are used

    What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip <https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB4NHSYRHABU4B3KQD5TIL3UWQHFBANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNZHW3QW3KHXJ53YUVERQDUWRM37ANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

tinyi commented 2 years ago

Could you please direct me to the updated version if possible? The github repository was updated yesterday. You may simply follow the instructions on https://github.com/Danko-Lab/TED to install (upgrade).

When you said "put if.vst=FALSE in the function argument", you mean thefunction run.Ted(..., if.vst=FALSE)? yes

On Mon, Jan 17, 2022 at 1:31 PM Moh Huda @.***> wrote:

Dear Tinyi,

I am currently using the RStudio server and the last time I installed BayesPrism it was quite difficult and I need the admin help to resolve the issue.

Could you please direct me to the updated version if possible?

When you said "put if.vst=FALSE in the function argument", you mean the function run.Ted(..., if.vst=FALSE)?

I am sorry I am really bad at programming. Thank you for your help and patience.

Regards,

Huda

On Mon, 17 Jan 2022, 18:21 Tinyi Chu, @.***> wrote:

Hi Huda,

No, you do not need to change the code. You only need to re-install the updated package, and put if.vst=FALSE in the function argument.

Best,

Tinyi

On Mon, Jan 17, 2022 at 8:00 AM Moh Huda @.***> wrote:

Dear Tinyi,

I want to confirm that the line I need to modify is line 335 from if(if.vst){ becoming if(if.vst=FALSE){

Is that all? Thank you very much for your help and reply.

Best regards,

Huda

On Mon, 17 Jan 2022, 07:40 Tinyi Chu, @.***> wrote:

Hi Moh,

Thank you for your question. This seems to be caused by the sparsity of your simulated data. If you run vst (from the DEseq2 package) on your dataset, it gives the same error, which means that there are less than 'nsub'(nsub=1000) rows with mean normalized count > 5.

I added an argument of if.vst in the run.Ted function, to allow you to bypass the vst step. Simply set if.vst=FALSE, to disable vst.

Let me know if there are any questions.

Best,

Tinyi

On Sat, Jan 15, 2022 at 7:30 PM Moh Huda @.***> wrote:

I have some different types of data (real data, semisynthetic data, and fully synthetic data generated using splatter software). When running the data and got the message "every gene has at least one zero. vst transformation is NOT feasible”, the running process is successful. However, when running different data and got the message "vst transformation is feasible" the execution failed (running process failed). The error message is

  1. "Error in vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) : less than 'nsub' rows with mean normalized count > 5, it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few genes are used

    What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip < https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHW3QW3KHXJ53YUVERQDUWRM37ANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS6M3WZBH5VIQG6PSJLUWRN6XANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

emkahuda commented 2 years ago

Dear Tinyi,

Got it. Thank you very much.

Best regards,

Huda

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Tinyi Chu @.> Sent: Monday, January 17, 2022 6:36:48 PM To: Danko-Lab/TED @.> Cc: Moh Huda @.>; Author @.> Subject: Re: [Danko-Lab/TED] vst transformation is feasible, but failed executing the next command (Issue #15)

Could you please direct me to the updated version if possible? The github repository was updated yesterday. You may simply follow the instructions on https://github.com/Danko-Lab/TED to install (upgrade).

When you said "put if.vst=FALSE in the function argument", you mean thefunction run.Ted(..., if.vst=FALSE)? yes

On Mon, Jan 17, 2022 at 1:31 PM Moh Huda @.***> wrote:

Dear Tinyi,

I am currently using the RStudio server and the last time I installed BayesPrism it was quite difficult and I need the admin help to resolve the issue.

Could you please direct me to the updated version if possible?

When you said "put if.vst=FALSE in the function argument", you mean the function run.Ted(..., if.vst=FALSE)?

I am sorry I am really bad at programming. Thank you for your help and patience.

Regards,

Huda

On Mon, 17 Jan 2022, 18:21 Tinyi Chu, @.***> wrote:

Hi Huda,

No, you do not need to change the code. You only need to re-install the updated package, and put if.vst=FALSE in the function argument.

Best,

Tinyi

On Mon, Jan 17, 2022 at 8:00 AM Moh Huda @.***> wrote:

Dear Tinyi,

I want to confirm that the line I need to modify is line 335 from if(if.vst){ becoming if(if.vst=FALSE){

Is that all? Thank you very much for your help and reply.

Best regards,

Huda

On Mon, 17 Jan 2022, 07:40 Tinyi Chu, @.***> wrote:

Hi Moh,

Thank you for your question. This seems to be caused by the sparsity of your simulated data. If you run vst (from the DEseq2 package) on your dataset, it gives the same error, which means that there are less than 'nsub'(nsub=1000) rows with mean normalized count > 5.

I added an argument of if.vst in the run.Ted function, to allow you to bypass the vst step. Simply set if.vst=FALSE, to disable vst.

Let me know if there are any questions.

Best,

Tinyi

On Sat, Jan 15, 2022 at 7:30 PM Moh Huda @.***> wrote:

I have some different types of data (real data, semisynthetic data, and fully synthetic data generated using splatter software). When running the data and got the message "every gene has at least one zero. vst transformation is NOT feasible”, the running process is successful. However, when running different data and got the message "vst transformation is feasible" the execution failed (running process failed). The error message is

  1. "Error in vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) : less than 'nsub' rows with mean normalized count > 5, it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few genes are used

    What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip < https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHW3QW3KHXJ53YUVERQDUWRM37ANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS6M3WZBH5VIQG6PSJLUWRN6XANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKNZHW6477WRGKUN3FUUOJ3UWROUBANCNFSM5MBTIUWA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>

emkahuda commented 2 years ago

Dear Tinyi,

I have updated the package TED in R and have added the argument if.vst = FALSE in runTED.R function This is to be precise what I have used run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels = @.$seurat_clusters, cell.subtype.labels = @.$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels = @.***$seurat_clusters, : unused argument (if.vst = FALSE).

  1. I suppose I use the argument incorrectly. a) Then where should this argument be added then? b) Or is it possible that I might fail in updating the package which leads to this error message?

  2. The version of the package TED I got is packageVersion("TED”) [1] ‘1.1’. Is it the correct one for the most updated?

Thank you very much.

Regards,

Huda

On 17 Jan 2022, at 18:36, Tinyi Chu @.***> wrote:

Could you please direct me to the updated version if possible? The github repository was updated yesterday. You may simply follow the instructions on https://github.com/Danko-Lab/TED to install (upgrade).

When you said "put if.vst=FALSE in the function argument", you mean thefunction run.Ted(..., if.vst=FALSE)? yes

On Mon, Jan 17, 2022 at 1:31 PM Moh Huda @.***> wrote:

Dear Tinyi,

I am currently using the RStudio server and the last time I installed BayesPrism it was quite difficult and I need the admin help to resolve the issue.

Could you please direct me to the updated version if possible?

When you said "put if.vst=FALSE in the function argument", you mean the function run.Ted(..., if.vst=FALSE)?

I am sorry I am really bad at programming. Thank you for your help and patience.

Regards,

Huda

On Mon, 17 Jan 2022, 18:21 Tinyi Chu, @.***> wrote:

Hi Huda,

No, you do not need to change the code. You only need to re-install the updated package, and put if.vst=FALSE in the function argument.

Best,

Tinyi

On Mon, Jan 17, 2022 at 8:00 AM Moh Huda @.***> wrote:

Dear Tinyi,

I want to confirm that the line I need to modify is line 335 from if(if.vst){ becoming if(if.vst=FALSE){

Is that all? Thank you very much for your help and reply.

Best regards,

Huda

On Mon, 17 Jan 2022, 07:40 Tinyi Chu, @.***> wrote:

Hi Moh,

Thank you for your question. This seems to be caused by the sparsity of your simulated data. If you run vst (from the DEseq2 package) on your dataset, it gives the same error, which means that there are less than 'nsub'(nsub=1000) rows with mean normalized count > 5.

I added an argument of if.vst in the run.Ted function, to allow you to bypass the vst step. Simply set if.vst=FALSE, to disable vst.

Let me know if there are any questions.

Best,

Tinyi

On Sat, Jan 15, 2022 at 7:30 PM Moh Huda @.***> wrote:

I have some different types of data (real data, semisynthetic data, and fully synthetic data generated using splatter software). When running the data and got the message "every gene has at least one zero. vst transformation is NOT feasible”, the running process is successful. However, when running different data and got the message "vst transformation is feasible" the execution failed (running process failed). The error message is

  1. "Error in vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) : less than 'nsub' rows with mean normalized count > 5, it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few genes are used

    What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip < https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHW3QW3KHXJ53YUVERQDUWRM37ANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS6M3WZBH5VIQG6PSJLUWRN6XANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNZHW6477WRGKUN3FUUOJ3UWROUBANCNFSM5MBTIUWA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

tinyi commented 2 years ago

Hi Huda,

Yes. I think you did not update the package correctly. To check, you can simply type run.Ted in your R console, and see if the argument if.vst is in it.

Best,

Tinyi

On Wed, Jan 19, 2022 at 3:54 PM Moh Huda @.***> wrote:

Dear Tinyi,

I have updated the package TED in R and have added the argument if.vst = FALSE in runTED.R function This is to be precise what I have used run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels = @.$seurat_clusters, cell.subtype.labels = @.$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels = @.***$seurat_clusters, : unused argument (if.vst = FALSE).

  1. I suppose I use the argument incorrectly. a) Then where should this argument be added then? b) Or is it possible that I might fail in updating the package which leads to this error message?

  2. The version of the package TED I got is packageVersion("TED”) [1] ‘1.1’. Is it the correct one for the most updated?

Thank you very much.

Regards,

Huda

On 17 Jan 2022, at 18:36, Tinyi Chu @.***> wrote:

Could you please direct me to the updated version if possible? The github repository was updated yesterday. You may simply follow the instructions on https://github.com/Danko-Lab/TED to install (upgrade).

When you said "put if.vst=FALSE in the function argument", you mean thefunction run.Ted(..., if.vst=FALSE)? yes

On Mon, Jan 17, 2022 at 1:31 PM Moh Huda @.***> wrote:

Dear Tinyi,

I am currently using the RStudio server and the last time I installed BayesPrism it was quite difficult and I need the admin help to resolve the issue.

Could you please direct me to the updated version if possible?

When you said "put if.vst=FALSE in the function argument", you mean the function run.Ted(..., if.vst=FALSE)?

I am sorry I am really bad at programming. Thank you for your help and patience.

Regards,

Huda

On Mon, 17 Jan 2022, 18:21 Tinyi Chu, @.***> wrote:

Hi Huda,

No, you do not need to change the code. You only need to re-install the updated package, and put if.vst=FALSE in the function argument.

Best,

Tinyi

On Mon, Jan 17, 2022 at 8:00 AM Moh Huda @.***> wrote:

Dear Tinyi,

I want to confirm that the line I need to modify is line 335 from if(if.vst){ becoming if(if.vst=FALSE){

Is that all? Thank you very much for your help and reply.

Best regards,

Huda

On Mon, 17 Jan 2022, 07:40 Tinyi Chu, @.***> wrote:

Hi Moh,

Thank you for your question. This seems to be caused by the sparsity of your simulated data. If you run vst (from the DEseq2 package) on your dataset, it gives the same error, which means that there are less than 'nsub'(nsub=1000) rows with mean normalized count > 5.

I added an argument of if.vst in the run.Ted function, to allow you to bypass the vst step. Simply set if.vst=FALSE, to disable vst.

Let me know if there are any questions.

Best,

Tinyi

On Sat, Jan 15, 2022 at 7:30 PM Moh Huda @.***> wrote:

I have some different types of data (real data, semisynthetic data, and fully synthetic data generated using splatter software). When running the data and got the message "every gene has at least one zero. vst transformation is NOT feasible”, the running process is successful. However, when running different data and got the message "vst transformation is feasible" the execution failed (running process failed). The error message is

  1. "Error in vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) : less than 'nsub' rows with mean normalized count > 5, it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few genes are used

    What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip < https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB4NHS6M3WZBH5VIQG6PSJLUWRN6XANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHW6477WRGKUN3FUUOJ3UWROUBANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016859717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS7F3COPMHUY2IMO7FTUW4QIFANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

emkahuda commented 2 years ago

Dear Tinyi,

Yes indeed, the argument is not in runTED yet. If successful, the argument if.vst should be there, then. However, what is the TED package version for the most updated one so that we can check if the most updated one is the one that is installed? I tried to find this information on your Github account or in the CRAN list but unfortunately I could not find it.

Thank you very much.

Regards,

Huda

run.Ted function (ref.dat, X, cell.type.labels, cell.subtype.labels = NULL, tum.key = NULL, input.type, pseudo.min = 1e-08, alpha = 1, sigma = 2, outlier.cut = 0.01, outlier.fraction = 0.1, gibbs.control = list(chain.length = 1000, burn.in = 500, thinning = 2), opt.control = list(trace = 0, maxit = 10000), n.cores = 1, n.cores.2g = NULL, pdf.name = NULL, first.gibbs.only = F) { if (is.null(colnames(ref.dat))) stop("Error: please specify the gene names of ref.dat!") if (is.null(colnames(X))) stop("Error: please specify the gene names of X!") if (is.null(cell.type.labels)) stop("Error: please specify the cell.types.labels!") if (nrow(ref.dat) != length(cell.type.labels)) stop("Error: nrow(ref.dat) and length(cell.type.labels) need to be the same!") if (is.null(n.cores.2g)) n.cores.2g <- n.cores if (is.null(cell.subtype.labels)) cell.subtype.labels <- cell.type.labels cell.type.labels <- as.character(cell.type.labels) cell.subtype.labels <- as.character(cell.subtype.labels) type.to.subtype.mapping <- unique(cbind(cell.type = cell.type.labels, cell.subtype = cell.subtype.labels)) if (max(table(type.to.subtype.mapping[, "cell.subtype"])) > 1) stop("Error: one or more subtypes belong to multiple cell types!") if (length(unique(cell.type.labels)) > length(unique(cell.subtype.labels))) stop("Error: more cell types than subtypes!") print("removing non-numeric genes...") ref.dat <- ref.dat[, apply(ref.dat, 2, function(ref.dat.gene.i) as.logical(prod(is.numeric(ref.dat.gene.i), is.finite(ref.dat.gene.i))))] X <- X[, apply(X, 2, function(X.gene.i) as.logical(prod(is.numeric(X.gene.i), is.finite(X.gene.i)))), drop = F] print("removing outlier genes...") X.norm <- apply(X, 1, function(vec) vec/sum(vec)) filter.idx <- apply(X.norm > outlier.cut, 1, sum)/ncol(X.norm) > outlier.fraction X <- X[, !filter.idx, drop = F] cat("Number of outlier genes filtered=", sum(filter.idx), "\n") if (!input.type %in% c("scRNA", "GEP")) stop("Error: please specify the correct input.type!") print("aligning reference and mixture...") if (input.type == "GEP") { stopifnot(nrow(ref.dat) == length(cell.type.labels)) processed.dat <- process_GEP(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels) } if (input.type == "scRNA") { stopifnot(nrow(ref.dat) == length(cell.subtype.labels)) processed.dat <- process_scRNA(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels, cell.subtype.labels = cell.subtype.labels) } if (!is.null(tum.key)) { tum.idx <- which(rownames(processed.dat$prior.matched.norm) == tum.key) if (length(tum.idx) == 0) stop("Error: tum.key is not matched to any rownames of the reference, please check the spelling!") processed.dat$prior.matched.norm <- processed.dat$prior.matched.norm[-tum.idx, ] } else print("No tumor reference is speficied. Reference profiles are treated equally.") type.to.subtype.mapping <- type.to.subtype.mapping[match(rownames(processed.dat$ref.matched.norm), type.to.subtype.mapping[, "cell.subtype"]), ] rm(ref.dat, X, cell.type.labels, cell.subtype.labels) gc() ted.res <- run.Ted.main(input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, X = processed.dat$mixture.matched, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores, n.cores.2g = n.cores.2g, first.gibbs.only = first.gibbs.only) para <- list(X = processed.dat$mixture.matched, input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, pseudo.min = pseudo.min, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores) ted.res$para <- para if (!is.null(tum.key)) { Zkg.tum <- ted.res$res$first.gibbs.res$Zkg.tum Zkg.tum.round <- t(round(Zkg.tum)) if.vst <- sum(apply(Zkg.tum.round, 1, min) == 0) < nrow(Zkg.tum.round) if (if.vst & nrow(Zkg.tum.round) > 1) { print("vst transformation is feasible") Zkg.tum.vst <- vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) cor.mat <- get.cormat(Zkg.tum = Zkg.tum.vst) } else { if (nrow(Zkg.tum.round) == 1) print("only one mixture sample. vst transformation is NOT feasible") else print("every gene has at least one zero. vst transformation is NOT feasible") Zkg.tum.vst <- NULL cor.mat <- get.cormat(Zkg.tum = ted.res$res$first.gibbs.res$Zkg.tum.norm) } ted.res$res$first.gibbs.res$Zkg.tum.vst <- Zkg.tum.vst ted.res$res$first.gibbs.res$cor.mat <- cor.mat if (!is.null(pdf.name) & nrow(Zkg.tum.round) > 1) plot.heatmap(dat = cor.mat, pdf.name = pdf.name, cluster = T, self = T, show.value = F, metric = "is.cor") } return(ted.res) } <bytecode: 0x7f3c01e965c8>

On 19 Jan 2022, at 20:56, Tinyi Chu ***@***.***> wrote: Hi Huda, Yes. I think you did not update the package correctly. To check, you can simply type run.Ted in your R console, and see if the argument if.vst is in it. Best, Tinyi On Wed, Jan 19, 2022 at 3:54 PM Moh Huda ***@***.***> wrote: > Dear Tinyi, > > I have updated the package TED in R and have added the argument if.vst = > FALSE in runTED.R function This is to be precise what I have used > run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels > = ***@***.***$seurat_clusters, cell.subtype.labels = > ***@***.***$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = > 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this > error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, > cell.type.labels = ***@***.***$seurat_clusters, : > unused argument (if.vst = FALSE). > 1. I suppose I use the argument incorrectly. a) Then where should this > argument be added then? b) Or is it possible that I might fail in updating > the package which leads to this error message? > > 2. The version of the package TED I got is packageVersion("TED”) [1] > ‘1.1’. Is it the correct one for the most updated? > > > Thank you very much. > > Regards, > > Huda > > On 17 Jan 2022, at 18:36, Tinyi Chu ***@***.***> wrote: > > > > > > *Could you please direct me to the updated version if possible?* > > The github repository was updated yesterday. You may simply follow the > > instructions on https://github.com/Danko-Lab/TED to install (upgrade). > > > > > > *When you said "put if.vst=FALSE in the function argument", you mean > > thefunction run.Ted(..., if.vst=FALSE)?* > > yes > > > > On Mon, Jan 17, 2022 at 1:31 PM Moh Huda ***@***.***> wrote: > > > > > Dear Tinyi, > > > > > > I am currently using the RStudio server and the last time I installed > > > BayesPrism it was quite difficult and I need the admin help to resolve > the > > > issue. > > > > > > Could you please direct me to the updated version if possible? > > > > > > When you said "put if.vst=FALSE in the function argument", you mean the > > > function run.Ted(..., if.vst=FALSE)? > > > > > > I am sorry I am really bad at programming. Thank you for your help and > > > patience. > > > > > > Regards, > > > > > > Huda > > > > > > On Mon, 17 Jan 2022, 18:21 Tinyi Chu, ***@***.***> wrote: > > > > > > > Hi Huda, > > > > > > > > No, you do not need to change the code. You only need to re-install > the > > > > updated package, and put if.vst=FALSE in the function argument. > > > > > > > > Best, > > > > > > > > Tinyi > > > > > > > > On Mon, Jan 17, 2022 at 8:00 AM Moh Huda ***@***.***> wrote: > > > > > > > > > Dear Tinyi, > > > > > > > > > > > > > > > I want to confirm that the line I need to modify is line 335 from > > > > > if(if.vst){ > > > > > becoming if(if.vst=FALSE){ > > > > > > > > > > Is that all? Thank you very much for your help and reply. > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Huda > > > > > > > > > > On Mon, 17 Jan 2022, 07:40 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > > > Hi Moh, > > > > > > > > > > > > Thank you for your question. This seems to be caused by the > sparsity > > > of > > > > > > your simulated data. If you run vst (from the DEseq2 package) on > your > > > > > > dataset, it gives the same error, which means that there are less > > > than > > > > > > 'nsub'(nsub=1000) rows with mean normalized count > 5. > > > > > > > > > > > > I added an argument of if.vst in the run.Ted function, to allow > you > > > to > > > > > > bypass the vst step. Simply set if.vst=FALSE, to disable vst. > > > > > > > > > > > > Let me know if there are any questions. > > > > > > > > > > > > Best, > > > > > > > > > > > > Tinyi > > > > > > > > > > > > > > > > > > On Sat, Jan 15, 2022 at 7:30 PM Moh Huda ***@***.***> wrote: > > > > > > > > > > > > > I have some different types of data (real data, semisynthetic > data, > > > > and > > > > > > > fully synthetic data generated using splatter software). When > > > running > > > > > the > > > > > > > data and got the message "every gene has at least one zero. vst > > > > > > > transformation is NOT feasible”, the running process is > successful. > > > > > > > However, when running different data and got the message "vst > > > > > > > transformation is feasible" the execution failed (running > process > > > > > > failed). > > > > > > > The error message is > > > > > > > > > > > > > > 1. "Error in vst(Zkg.tum.round, nsub = > min(nrow(Zkg.tum.round)/5, > > > > > > > 1000)) : > > > > > > > less than 'nsub' rows with mean normalized count > 5, > > > > > > > it is recommended to use varianceStabilizingTransformation > > > directly". > > > > > > > > > > > > > > I check the file called runTed.R and this command is in line > 335. > > > The > > > > > > > suggestion there said that, > > > > > > > > > > > > > > 1. #adjust nsub, to avoid error when too few genes are used > > > > > > > What I understand that I need to change the function vst() on > the > > > > line > > > > > > > 335 to varianceStabilizingTransformation(), but it does not > work > > > > > either. > > > > > > > Also, I have no idea how to adjust nsub (the suggestion number > 2 > > > > > above). > > > > > > > > > > > > > > Could you please give a suggestion? Thank you. > > > > > > > > > > > > > > I attach the two sample data types. > > > > > > > rstudio-export-2.zip > > > > > > > < > > > https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip > > > > > > > > > > > > > > > > > > > — > > > > > > > Reply to this email directly, view it on GitHub > > > > > > > , or unsubscribe > > > > > > > < > > > > > > > > > > > > > > > > > > > https://github.com/notifications/unsubscribe-auth/AB4NHS26BBA42WZU3PR72NDUWIGTVANCNFSM5MBTIUWA > > > > > > > > > > > > > > . > > > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > > > < > > > > > > > > > > > > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > > > > > or Android > > > > > > > < > > > > > > > > > > > > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > > > >. > > > > > > > > > > > > > > You are receiving this because you are subscribed to this > > > > > thread.Message > > > > > > > ID: ***@***.***> > > > > > > > > > > > > > > > > > > > — > > > > > > Reply to this email directly, view it on GitHub > > > > > > < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 > > > >, > > > > or > > > > > > unsubscribe > > > > > > < > > > > > > > > > > > > > https://github.com/notifications/unsubscribe-auth/AKNZHWZ6PLNPI3O6G2XEEM3UWPBXTANCNFSM5MBTIUWA > > > > > > > > > > > > . > > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > > < > > > > > > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > > > or Android > > > > > > < > > > > > > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > > >. > > > > > > > > > > > > You are receiving this because you authored the thread.Message > ID: > > > > > > ***@***.***> > > > > > > > > > > > > > > > > — > > > > > Reply to this email directly, view it on GitHub > > > > > < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281>, > > > or > > > > > unsubscribe > > > > > < > > > > > > > > https://github.com/notifications/unsubscribe-auth/AB4NHSYRHABU4B3KQD5TIL3UWQHFBANCNFSM5MBTIUWA > > > > > > > > > > . > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > < > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > or Android > > > > > < > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > >. > > > > > > > > > > You are receiving this because you commented.Message ID: > > > > > ***@***.***> > > > > > > > > > > > > > — > > > > Reply to this email directly, view it on GitHub > > > > , > or > > > > unsubscribe > > > > < > > > > https://github.com/notifications/unsubscribe-auth/AKNZHW3QW3KHXJ53YUVERQDUWRM37ANCNFSM5MBTIUWA > > > > > > > > . > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > < > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > or Android > > > > < > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > >. > > > > > > > > You are receiving this because you authored the thread.Message ID: > > > > ***@***.***> > > > > > > > > > > — > > > Reply to this email directly, view it on GitHub > > > , > or > > > unsubscribe > > > < > https://github.com/notifications/unsubscribe-auth/AB4NHS6M3WZBH5VIQG6PSJLUWRN6XANCNFSM5MBTIUWA > > > > > . > > > Triage notifications on the go with GitHub Mobile for iOS > > > < > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > or Android > > > < > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > >. > > > > > > You are receiving this because you commented.Message ID: > > > ***@***.***> > > > > > — > > Reply to this email directly, view it on GitHub < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680>, or > unsubscribe < > https://github.com/notifications/unsubscribe-auth/AKNZHW6477WRGKUN3FUUOJ3UWROUBANCNFSM5MBTIUWA > >. > > Triage notifications on the go with GitHub Mobile for iOS < > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> > or Android < > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. > > > You are receiving this because you authored the thread. > > > > — > Reply to this email directly, view it on GitHub > , or > unsubscribe > > . > Triage notifications on the go with GitHub Mobile for iOS > > or Android > . > > You are receiving this because you commented.Message ID: > ***@***.***> > — Reply to this email directly, view it on GitHub , or unsubscribe . Triage notifications on the go with GitHub Mobile for iOS or Android . You are receiving this because you authored the thread.
tinyi commented 2 years ago

BayesPrism is not on CRAN yet. I did not update the version for this update. You may simply uninstall and re-install the latest github repository.

On Wed, Jan 19, 2022 at 4:04 PM Moh Huda @.***> wrote:

Dear Tinyi,

Yes indeed, the argument is not in runTED yet. If successful, the argument if.vst should be there, then. However, what is the TED package version for the most updated one so that we can check if the most updated one is the one that is installed? I tried to find this information on your Github account or in the CRAN list but unfortunately I could not find it.

Thank you very much.

Regards,

Huda

run.Ted function (ref.dat, X, cell.type.labels, cell.subtype.labels = NULL, tum.key = NULL, input.type, pseudo.min = 1e-08, alpha = 1, sigma = 2, outlier.cut = 0.01, outlier.fraction = 0.1, gibbs.control = list(chain.length = 1000, burn.in = 500, thinning = 2), opt.control = list(trace = 0, maxit = 10000), n.cores = 1, n.cores.2g = NULL, pdf.name = NULL, first.gibbs.only = F) { if (is.null(colnames(ref.dat))) stop("Error: please specify the gene names of ref.dat!") if (is.null(colnames(X))) stop("Error: please specify the gene names of X!") if (is.null(cell.type.labels)) stop("Error: please specify the cell.types.labels!") if (nrow(ref.dat) != length(cell.type.labels)) stop("Error: nrow(ref.dat) and length(cell.type.labels) need to be the same!") if (is.null(n.cores.2g)) n.cores.2g <- n.cores if (is.null(cell.subtype.labels)) cell.subtype.labels <- cell.type.labels cell.type.labels <- as.character(cell.type.labels) cell.subtype.labels <- as.character(cell.subtype.labels) type.to.subtype.mapping <- unique(cbind(cell.type = cell.type.labels, cell.subtype = cell.subtype.labels)) if (max(table(type.to.subtype.mapping[, "cell.subtype"])) > 1) stop("Error: one or more subtypes belong to multiple cell types!") if (length(unique(cell.type.labels)) > length(unique(cell.subtype.labels))) stop("Error: more cell types than subtypes!") print("removing non-numeric genes...") ref.dat <- ref.dat[, apply(ref.dat, 2, function(ref.dat.gene.i) as.logical(prod(is.numeric(ref.dat.gene.i), is.finite(ref.dat.gene.i))))] X <- X[, apply(X, 2, function(X.gene.i) as.logical(prod(is.numeric(X.gene.i), is.finite(X.gene.i)))), drop = F] print("removing outlier genes...") X.norm <- apply(X, 1, function(vec) vec/sum(vec)) filter.idx <- apply(X.norm > outlier.cut, 1, sum)/ncol(X.norm) > outlier.fraction X <- X[, !filter.idx, drop = F] cat("Number of outlier genes filtered=", sum(filter.idx), "\n") if (!input.type %in% c("scRNA", "GEP")) stop("Error: please specify the correct input.type!") print("aligning reference and mixture...") if (input.type == "GEP") { stopifnot(nrow(ref.dat) == length(cell.type.labels)) processed.dat <- process_GEP(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels) } if (input.type == "scRNA") { stopifnot(nrow(ref.dat) == length(cell.subtype.labels)) processed.dat <- process_scRNA(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels, cell.subtype.labels = cell.subtype.labels) } if (!is.null(tum.key)) { tum.idx <- which(rownames(processed.dat$prior.matched.norm) == tum.key) if (length(tum.idx) == 0) stop("Error: tum.key is not matched to any rownames of the reference, please check the spelling!") processed.dat$prior.matched.norm <- processed.dat$prior.matched.norm[-tum.idx, ] } else print("No tumor reference is speficied. Reference profiles are treated equally.") type.to.subtype.mapping <- type.to.subtype.mapping[match(rownames(processed.dat$ref.matched.norm), type.to.subtype.mapping[, "cell.subtype"]), ] rm(ref.dat, X, cell.type.labels, cell.subtype.labels) gc() ted.res <- run.Ted.main(input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, X = processed.dat$mixture.matched, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores, n.cores.2g = n.cores.2g, first.gibbs.only = first.gibbs.only) para <- list(X = processed.dat$mixture.matched, input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, pseudo.min = pseudo.min, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores) ted.res$para <- para if (!is.null(tum.key)) { Zkg.tum <- ted.res$res$first.gibbs.res$Zkg.tum Zkg.tum.round <- t(round(Zkg.tum)) if.vst <- sum(apply(Zkg.tum.round, 1, min) == 0) < nrow(Zkg.tum.round) if (if.vst & nrow(Zkg.tum.round) > 1) { print("vst transformation is feasible") Zkg.tum.vst <- vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) cor.mat <- get.cormat(Zkg.tum = Zkg.tum.vst) } else { if (nrow(Zkg.tum.round) == 1) print("only one mixture sample. vst transformation is NOT feasible") else print("every gene has at least one zero. vst transformation is NOT feasible") Zkg.tum.vst <- NULL cor.mat <- get.cormat(Zkg.tum = ted.res$res$first.gibbs.res$Zkg.tum.norm) } ted.res$res$first.gibbs.res$Zkg.tum.vst <- Zkg.tum.vst ted.res$res$first.gibbs.res$cor.mat <- cor.mat if (!is.null(pdf.name) & nrow(Zkg.tum.round) > 1) plot.heatmap(dat = cor.mat, pdf.name = pdf.name, cluster = T, self = T, show.value = F, metric = "is.cor") } return(ted.res) } <bytecode: 0x7f3c01e965c8>

On 19 Jan 2022, at 20:56, Tinyi Chu ***@***.***> wrote: Hi Huda, Yes. I think you did not update the package correctly. To check, you can simply type run.Ted in your R console, and see if the argument if.vst is in it. Best, Tinyi On Wed, Jan 19, 2022 at 3:54 PM Moh Huda ***@***.***> wrote: > Dear Tinyi, > > I have updated the package TED in R and have added the argument if.vst = > FALSE in runTED.R function This is to be precise what I have used > run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels > = ***@***.***$seurat_clusters, cell.subtype.labels = > ***@***.***$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = > 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this > error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, > cell.type.labels = ***@***.***$seurat_clusters, : > unused argument (if.vst = FALSE). > 1. I suppose I use the argument incorrectly. a) Then where should this > argument be added then? b) Or is it possible that I might fail in updating > the package which leads to this error message? > > 2. The version of the package TED I got is packageVersion("TED”) [1] > ‘1.1’. Is it the correct one for the most updated? > > > Thank you very much. > > Regards, > > Huda > > On 17 Jan 2022, at 18:36, Tinyi Chu ***@***.***> wrote: > > > > > > *Could you please direct me to the updated version if possible?* > > The github repository was updated yesterday. You may simply follow the > > instructions on https://github.com/Danko-Lab/TED to install (upgrade). > > > > > > *When you said "put if.vst=FALSE in the function argument", you mean > > thefunction run.Ted(..., if.vst=FALSE)?* > > yes > > > > On Mon, Jan 17, 2022 at 1:31 PM Moh Huda ***@***.***> wrote: > > > > > Dear Tinyi, > > > > > > I am currently using the RStudio server and the last time I installed > > > BayesPrism it was quite difficult and I need the admin help to resolve > the > > > issue. > > > > > > Could you please direct me to the updated version if possible? > > > > > > When you said "put if.vst=FALSE in the function argument", you mean the > > > function run.Ted(..., if.vst=FALSE)? > > > > > > I am sorry I am really bad at programming. Thank you for your help and > > > patience. > > > > > > Regards, > > > > > > Huda > > > > > > On Mon, 17 Jan 2022, 18:21 Tinyi Chu, ***@***.***> wrote: > > > > > > > Hi Huda, > > > > > > > > No, you do not need to change the code. You only need to re-install > the > > > > updated package, and put if.vst=FALSE in the function argument. > > > > > > > > Best, > > > > > > > > Tinyi > > > > > > > > On Mon, Jan 17, 2022 at 8:00 AM Moh Huda ***@***.***> wrote: > > > > > > > > > Dear Tinyi, > > > > > > > > > > > > > > > I want to confirm that the line I need to modify is line 335 from > > > > > if(if.vst){ > > > > > becoming if(if.vst=FALSE){ > > > > > > > > > > Is that all? Thank you very much for your help and reply. > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Huda > > > > > > > > > > On Mon, 17 Jan 2022, 07:40 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > > > Hi Moh, > > > > > > > > > > > > Thank you for your question. This seems to be caused by the > sparsity > > > of > > > > > > your simulated data. If you run vst (from the DEseq2 package) on > your > > > > > > dataset, it gives the same error, which means that there are less > > > than > > > > > > 'nsub'(nsub=1000) rows with mean normalized count > 5. > > > > > > > > > > > > I added an argument of if.vst in the run.Ted function, to allow > you > > > to > > > > > > bypass the vst step. Simply set if.vst=FALSE, to disable vst. > > > > > > > > > > > > Let me know if there are any questions. > > > > > > > > > > > > Best, > > > > > > > > > > > > Tinyi > > > > > > > > > > > > > > > > > > On Sat, Jan 15, 2022 at 7:30 PM Moh Huda ***@***.***> wrote: > > > > > > > > > > > > > I have some different types of data (real data, semisynthetic > data, > > > > and > > > > > > > fully synthetic data generated using splatter software). When > > > running > > > > > the > > > > > > > data and got the message "every gene has at least one zero. vst > > > > > > > transformation is NOT feasible”, the running process is > successful. > > > > > > > However, when running different data and got the message "vst > > > > > > > transformation is feasible" the execution failed (running > process > > > > > > failed). > > > > > > > The error message is > > > > > > > > > > > > > > 1. "Error in vst(Zkg.tum.round, nsub = > min(nrow(Zkg.tum.round)/5, > > > > > > > 1000)) : > > > > > > > less than 'nsub' rows with mean normalized count > 5, > > > > > > > it is recommended to use varianceStabilizingTransformation > > > directly". > > > > > > > > > > > > > > I check the file called runTed.R and this command is in line > 335. > > > The > > > > > > > suggestion there said that, > > > > > > > > > > > > > > 1. #adjust nsub, to avoid error when too few genes are used > > > > > > > What I understand that I need to change the function vst() on > the > > > > line > > > > > > > 335 to varianceStabilizingTransformation(), but it does not > work > > > > > either. > > > > > > > Also, I have no idea how to adjust nsub (the suggestion number > 2 > > > > > above). > > > > > > > > > > > > > > Could you please give a suggestion? Thank you. > > > > > > > > > > > > > > I attach the two sample data types. > > > > > > > rstudio-export-2.zip > > > > > > > < > > > https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip > > > > > > > > > > > > > > > > > > > — > > > > > > > Reply to this email directly, view it on GitHub > > > > > > > , or unsubscribe > > > > > > > < > > > > > > > > > > > > > > > > > > > https://github.com/notifications/unsubscribe-auth/AB4NHS26BBA42WZU3PR72NDUWIGTVANCNFSM5MBTIUWA > > > > > > > > > > > > > > . > > > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > > > < > > > > > > > > > > > > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > > > > > or Android > > > > > > > < > > > > > > > > > > > > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > > > >. > > > > > > > > > > > > > > You are receiving this because you are subscribed to this > > > > > thread.Message > > > > > > > ID: ***@***.***> > > > > > > > > > > > > > > > > > > > — > > > > > > Reply to this email directly, view it on GitHub > > > > > > < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 > > > >, > > > > or > > > > > > unsubscribe > > > > > > < > > > > > > > > > > > > > https://github.com/notifications/unsubscribe-auth/AKNZHWZ6PLNPI3O6G2XEEM3UWPBXTANCNFSM5MBTIUWA > > > > > > > > > > > > . > > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > > < > > > > > > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > > > or Android > > > > > > < > > > > > > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > > >. > > > > > > > > > > > > You are receiving this because you authored the thread.Message > ID: > > > > > > ***@***.***> > > > > > > > > > > > > > > > > — > > > > > Reply to this email directly, view it on GitHub > > > > > < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281>, > > > or > > > > > unsubscribe > > > > > < > > > > > > > > https://github.com/notifications/unsubscribe-auth/AB4NHSYRHABU4B3KQD5TIL3UWQHFBANCNFSM5MBTIUWA > > > > > > > > > > . > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > < > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > or Android > > > > > < > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > >. > > > > > > > > > > You are receiving this because you commented.Message ID: > > > > > ***@***.***> > > > > > > > > > > > > > — > > > > Reply to this email directly, view it on GitHub > > > > < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175>, > or > > > > unsubscribe > > > > < > > > > https://github.com/notifications/unsubscribe-auth/AKNZHW3QW3KHXJ53YUVERQDUWRM37ANCNFSM5MBTIUWA > > > > > > > > . > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > < > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > or Android > > > > < > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > >. > > > > > > > > You are receiving this because you authored the thread.Message ID: > > > > ***@***.***> > > > > > > > > > > — > > > Reply to this email directly, view it on GitHub > > > < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754>, > or > > > unsubscribe > > > < > https://github.com/notifications/unsubscribe-auth/AB4NHS6M3WZBH5VIQG6PSJLUWRN6XANCNFSM5MBTIUWA > > > > > . > > > Triage notifications on the go with GitHub Mobile for iOS > > > < > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > or Android > > > < > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > >. > > > > > > You are receiving this because you commented.Message ID: > > > ***@***.***> > > > > > — > > Reply to this email directly, view it on GitHub < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680>, or > unsubscribe < > https://github.com/notifications/unsubscribe-auth/AKNZHW6477WRGKUN3FUUOJ3UWROUBANCNFSM5MBTIUWA > >. > > Triage notifications on the go with GitHub Mobile for iOS < > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android < > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . > > > You are receiving this because you authored the thread. > > > > — > Reply to this email directly, view it on GitHub > , or > unsubscribe > < https://github.com/notifications/unsubscribe-auth/AB4NHS7F3COPMHUY2IMO7FTUW4QIFANCNFSM5MBTIUWA > . > Triage notifications on the go with GitHub Mobile for iOS > < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android > < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . > > You are receiving this because you commented.Message ID: > ***@***.***> > — Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016861409>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHW4OPACTLEVRYCWTWRDUW4QRLANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016866839, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS6XOG3TQ6PI3JPC4TDUW4RONANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

emkahuda commented 2 years ago

I see. Thank you very much. I will try and hopefully, it will work.

Thank you very much.

Best wishes,

Huda

On 19 Jan 2022, at 21:58, Tinyi Chu @.***> wrote:

BayesPrism is not on CRAN yet. I did not update the version for this update. You may simply uninstall and re-install the latest github repository.

On Wed, Jan 19, 2022 at 4:04 PM Moh Huda @.***> wrote:

Dear Tinyi,

Yes indeed, the argument is not in runTED yet. If successful, the argument if.vst should be there, then. However, what is the TED package version for the most updated one so that we can check if the most updated one is the one that is installed? I tried to find this information on your Github account or in the CRAN list but unfortunately I could not find it.

Thank you very much.

Regards,

Huda

run.Ted function (ref.dat, X, cell.type.labels, cell.subtype.labels = NULL, tum.key = NULL, input.type, pseudo.min = 1e-08, alpha = 1, sigma = 2, outlier.cut = 0.01, outlier.fraction = 0.1, gibbs.control = list(chain.length = 1000, burn.in = 500, thinning = 2), opt.control = list(trace = 0, maxit = 10000), n.cores = 1, n.cores.2g = NULL, pdf.name = NULL, first.gibbs.only = F) { if (is.null(colnames(ref.dat))) stop("Error: please specify the gene names of ref.dat!") if (is.null(colnames(X))) stop("Error: please specify the gene names of X!") if (is.null(cell.type.labels)) stop("Error: please specify the cell.types.labels!") if (nrow(ref.dat) != length(cell.type.labels)) stop("Error: nrow(ref.dat) and length(cell.type.labels) need to be the same!") if (is.null(n.cores.2g)) n.cores.2g <- n.cores if (is.null(cell.subtype.labels)) cell.subtype.labels <- cell.type.labels cell.type.labels <- as.character(cell.type.labels) cell.subtype.labels <- as.character(cell.subtype.labels) type.to.subtype.mapping <- unique(cbind(cell.type = cell.type.labels, cell.subtype = cell.subtype.labels)) if (max(table(type.to.subtype.mapping[, "cell.subtype"])) > 1) stop("Error: one or more subtypes belong to multiple cell types!") if (length(unique(cell.type.labels)) > length(unique(cell.subtype.labels))) stop("Error: more cell types than subtypes!") print("removing non-numeric genes...") ref.dat <- ref.dat[, apply(ref.dat, 2, function(ref.dat.gene.i) as.logical(prod(is.numeric(ref.dat.gene.i), is.finite(ref.dat.gene.i))))] X <- X[, apply(X, 2, function(X.gene.i) as.logical(prod(is.numeric(X.gene.i), is.finite(X.gene.i)))), drop = F] print("removing outlier genes...") X.norm <- apply(X, 1, function(vec) vec/sum(vec)) filter.idx <- apply(X.norm > outlier.cut, 1, sum)/ncol(X.norm) > outlier.fraction X <- X[, !filter.idx, drop = F] cat("Number of outlier genes filtered=", sum(filter.idx), "\n") if (!input.type %in% c("scRNA", "GEP")) stop("Error: please specify the correct input.type!") print("aligning reference and mixture...") if (input.type == "GEP") { stopifnot(nrow(ref.dat) == length(cell.type.labels)) processed.dat <- process_GEP(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels) } if (input.type == "scRNA") { stopifnot(nrow(ref.dat) == length(cell.subtype.labels)) processed.dat <- process_scRNA(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels, cell.subtype.labels = cell.subtype.labels) } if (!is.null(tum.key)) { tum.idx <- which(rownames(processed.dat$prior.matched.norm) == tum.key) if (length(tum.idx) == 0) stop("Error: tum.key is not matched to any rownames of the reference, please check the spelling!") processed.dat$prior.matched.norm <- processed.dat$prior.matched.norm[-tum.idx, ] } else print("No tumor reference is speficied. Reference profiles are treated equally.") type.to.subtype.mapping <- type.to.subtype.mapping[match(rownames(processed.dat$ref.matched.norm), type.to.subtype.mapping[, "cell.subtype"]), ] rm(ref.dat, X, cell.type.labels, cell.subtype.labels) gc() ted.res <- run.Ted.main(input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, X = processed.dat$mixture.matched, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores, n.cores.2g = n.cores.2g, first.gibbs.only = first.gibbs.only) para <- list(X = processed.dat$mixture.matched, input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, pseudo.min = pseudo.min, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores) ted.res$para <- para if (!is.null(tum.key)) { Zkg.tum <- ted.res$res$first.gibbs.res$Zkg.tum Zkg.tum.round <- t(round(Zkg.tum)) if.vst <- sum(apply(Zkg.tum.round, 1, min) == 0) < nrow(Zkg.tum.round) if (if.vst & nrow(Zkg.tum.round) > 1) { print("vst transformation is feasible") Zkg.tum.vst <- vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) cor.mat <- get.cormat(Zkg.tum = Zkg.tum.vst) } else { if (nrow(Zkg.tum.round) == 1) print("only one mixture sample. vst transformation is NOT feasible") else print("every gene has at least one zero. vst transformation is NOT feasible") Zkg.tum.vst <- NULL cor.mat <- get.cormat(Zkg.tum = ted.res$res$first.gibbs.res$Zkg.tum.norm) } ted.res$res$first.gibbs.res$Zkg.tum.vst <- Zkg.tum.vst ted.res$res$first.gibbs.res$cor.mat <- cor.mat if (!is.null(pdf.name) & nrow(Zkg.tum.round) > 1) plot.heatmap(dat = cor.mat, pdf.name = pdf.name, cluster = T, self = T, show.value = F, metric = "is.cor") } return(ted.res) } <bytecode: 0x7f3c01e965c8>

On 19 Jan 2022, at 20:56, Tinyi Chu ***@***.***> wrote: Hi Huda, Yes. I think you did not update the package correctly. To check, you can simply type run.Ted in your R console, and see if the argument if.vst is in it. Best, Tinyi On Wed, Jan 19, 2022 at 3:54 PM Moh Huda ***@***.***> wrote: > Dear Tinyi, > > I have updated the package TED in R and have added the argument if.vst = > FALSE in runTED.R function This is to be precise what I have used > run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels > = ***@***.***$seurat_clusters, cell.subtype.labels = > ***@***.***$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = > 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this > error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, > cell.type.labels = ***@***.***$seurat_clusters, : > unused argument (if.vst = FALSE). > 1. I suppose I use the argument incorrectly. a) Then where should this > argument be added then? b) Or is it possible that I might fail in updating > the package which leads to this error message? > > 2. The version of the package TED I got is packageVersion("TED”) [1] > ‘1.1’. Is it the correct one for the most updated? > > > Thank you very much. > > Regards, > > Huda > > On 17 Jan 2022, at 18:36, Tinyi Chu ***@***.***> wrote: > > > > > > *Could you please direct me to the updated version if possible?* > > The github repository was updated yesterday. You may simply follow the > > instructions on https://github.com/Danko-Lab/TED to install (upgrade). > > > > > > *When you said "put if.vst=FALSE in the function argument", you mean > > thefunction run.Ted(..., if.vst=FALSE)?* > > yes > > > > On Mon, Jan 17, 2022 at 1:31 PM Moh Huda ***@***.***> wrote: > > > > > Dear Tinyi, > > > > > > I am currently using the RStudio server and the last time I installed > > > BayesPrism it was quite difficult and I need the admin help to resolve > the > > > issue. > > > > > > Could you please direct me to the updated version if possible? > > > > > > When you said "put if.vst=FALSE in the function argument", you mean the > > > function run.Ted(..., if.vst=FALSE)? > > > > > > I am sorry I am really bad at programming. Thank you for your help and > > > patience. > > > > > > Regards, > > > > > > Huda > > > > > > On Mon, 17 Jan 2022, 18:21 Tinyi Chu, ***@***.***> wrote: > > > > > > > Hi Huda, > > > > > > > > No, you do not need to change the code. You only need to re-install > the > > > > updated package, and put if.vst=FALSE in the function argument. > > > > > > > > Best, > > > > > > > > Tinyi > > > > > > > > On Mon, Jan 17, 2022 at 8:00 AM Moh Huda ***@***.***> wrote: > > > > > > > > > Dear Tinyi, > > > > > > > > > > > > > > > I want to confirm that the line I need to modify is line 335 from > > > > > if(if.vst){ > > > > > becoming if(if.vst=FALSE){ > > > > > > > > > > Is that all? Thank you very much for your help and reply. > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Huda > > > > > > > > > > On Mon, 17 Jan 2022, 07:40 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > > > Hi Moh, > > > > > > > > > > > > Thank you for your question. This seems to be caused by the > sparsity > > > of > > > > > > your simulated data. If you run vst (from the DEseq2 package) on > your > > > > > > dataset, it gives the same error, which means that there are less > > > than > > > > > > 'nsub'(nsub=1000) rows with mean normalized count > 5. > > > > > > > > > > > > I added an argument of if.vst in the run.Ted function, to allow > you > > > to > > > > > > bypass the vst step. Simply set if.vst=FALSE, to disable vst. > > > > > > > > > > > > Let me know if there are any questions. > > > > > > > > > > > > Best, > > > > > > > > > > > > Tinyi > > > > > > > > > > > > > > > > > > On Sat, Jan 15, 2022 at 7:30 PM Moh Huda ***@***.***> wrote: > > > > > > > > > > > > > I have some different types of data (real data, semisynthetic > data, > > > > and > > > > > > > fully synthetic data generated using splatter software). When > > > running > > > > > the > > > > > > > data and got the message "every gene has at least one zero. vst > > > > > > > transformation is NOT feasible”, the running process is > successful. > > > > > > > However, when running different data and got the message "vst > > > > > > > transformation is feasible" the execution failed (running > process > > > > > > failed). > > > > > > > The error message is > > > > > > > > > > > > > > 1. "Error in vst(Zkg.tum.round, nsub = > min(nrow(Zkg.tum.round)/5, > > > > > > > 1000)) : > > > > > > > less than 'nsub' rows with mean normalized count > 5, > > > > > > > it is recommended to use varianceStabilizingTransformation > > > directly". > > > > > > > > > > > > > > I check the file called runTed.R and this command is in line > 335. > > > The > > > > > > > suggestion there said that, > > > > > > > > > > > > > > 1. #adjust nsub, to avoid error when too few genes are used > > > > > > > What I understand that I need to change the function vst() on > the > > > > line > > > > > > > 335 to varianceStabilizingTransformation(), but it does not > work > > > > > either. > > > > > > > Also, I have no idea how to adjust nsub (the suggestion number > 2 > > > > > above). > > > > > > > > > > > > > > Could you please give a suggestion? Thank you. > > > > > > > > > > > > > > I attach the two sample data types. > > > > > > > rstudio-export-2.zip > > > > > > > < > > > https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip > > > > > > > > > > > > > > > > > > > — > > > > > > > Reply to this email directly, view it on GitHub > > > > > > > , or unsubscribe > > > > > > > < > > > > > > > > > > > > > > > > > > > https://github.com/notifications/unsubscribe-auth/AB4NHS26BBA42WZU3PR72NDUWIGTVANCNFSM5MBTIUWA > > > > > > > > > > > > > > . > > > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > > > < > > > > > > > > > > > > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > > > > > or Android > > > > > > > < > > > > > > > > > > > > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > > > >. > > > > > > > > > > > > > > You are receiving this because you are subscribed to this > > > > > thread.Message > > > > > > > ID: ***@***.***> > > > > > > > > > > > > > > > > > > > — > > > > > > Reply to this email directly, view it on GitHub > > > > > > < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 > > > >, > > > > or > > > > > > unsubscribe > > > > > > < > > > > > > > > > > > > > https://github.com/notifications/unsubscribe-auth/AKNZHWZ6PLNPI3O6G2XEEM3UWPBXTANCNFSM5MBTIUWA > > > > > > > > > > > > . > > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > > < > > > > > > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > > > or Android > > > > > > < > > > > > > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > > >. > > > > > > > > > > > > You are receiving this because you authored the thread.Message > ID: > > > > > > ***@***.***> > > > > > > > > > > > > > > > > — > > > > > Reply to this email directly, view it on GitHub > > > > > < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281>, > > > or > > > > > unsubscribe > > > > > < > > > > > > > > https://github.com/notifications/unsubscribe-auth/AB4NHSYRHABU4B3KQD5TIL3UWQHFBANCNFSM5MBTIUWA > > > > > > > > > > . > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > < > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > or Android > > > > > < > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > >. > > > > > > > > > > You are receiving this because you commented.Message ID: > > > > > ***@***.***> > > > > > > > > > > > > > — > > > > Reply to this email directly, view it on GitHub > > > > < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175>, > or > > > > unsubscribe > > > > < > > > > https://github.com/notifications/unsubscribe-auth/AKNZHW3QW3KHXJ53YUVERQDUWRM37ANCNFSM5MBTIUWA > > > > > > > > . > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > < > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > or Android > > > > < > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > >. > > > > > > > > You are receiving this because you authored the thread.Message ID: > > > > ***@***.***> > > > > > > > > > > — > > > Reply to this email directly, view it on GitHub > > > < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754>, > or > > > unsubscribe > > > < > https://github.com/notifications/unsubscribe-auth/AB4NHS6M3WZBH5VIQG6PSJLUWRN6XANCNFSM5MBTIUWA > > > > > . > > > Triage notifications on the go with GitHub Mobile for iOS > > > < > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > or Android > > > < > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > >. > > > > > > You are receiving this because you commented.Message ID: > > > ***@***.***> > > > > > — > > Reply to this email directly, view it on GitHub < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680>, or > unsubscribe < > https://github.com/notifications/unsubscribe-auth/AKNZHW6477WRGKUN3FUUOJ3UWROUBANCNFSM5MBTIUWA > >. > > Triage notifications on the go with GitHub Mobile for iOS < > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android < > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . > > > You are receiving this because you authored the thread. > > > > — > Reply to this email directly, view it on GitHub > , or > unsubscribe > < https://github.com/notifications/unsubscribe-auth/AB4NHS7F3COPMHUY2IMO7FTUW4QIFANCNFSM5MBTIUWA > . > Triage notifications on the go with GitHub Mobile for iOS > < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android > < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . > > You are receiving this because you commented.Message ID: > ***@***.***> > — Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016861409>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHW4OPACTLEVRYCWTWRDUW4QRLANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016866839, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS6XOG3TQ6PI3JPC4TDUW4RONANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016905928, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNZHW6ZNFX4RQJFN32G5JTUW4XYPANCNFSM5MBTIUWA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

emkahuda commented 2 years ago

Dear Tinyi,

I got this email from the admin for the server where I'm using the RStudio for programming.

"Dear Huda

I re-installed the package, but it still said that the installed version is the same as the github version. It refuses to uninstall though. Can you get more details from the author of how to install and uninstall?

As for the crashing problem, I think restarting r-server should fix this. I’ll need to warn those using it first.".

I experienced the R crashing last night after the admin trying to update. He suspected there is something wrong when the update was run. Could you please advise us how to uninstall and reinstall the package correctly and safely?

I really appreciate your help and understanding.

Best regards,

Huda

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Tinyi Chu @.> Sent: Wednesday, January 19, 2022 9:58:31 PM To: Danko-Lab/TED @.> Cc: Moh Huda @.>; Author @.> Subject: Re: [Danko-Lab/TED] vst transformation is feasible, but failed executing the next command (Issue #15)

BayesPrism is not on CRAN yet. I did not update the version for this update. You may simply uninstall and re-install the latest github repository.

On Wed, Jan 19, 2022 at 4:04 PM Moh Huda @.***> wrote:

Dear Tinyi,

Yes indeed, the argument is not in runTED yet. If successful, the argument if.vst should be there, then. However, what is the TED package version for the most updated one so that we can check if the most updated one is the one that is installed? I tried to find this information on your Github account or in the CRAN list but unfortunately I could not find it.

Thank you very much.

Regards,

Huda

run.Ted function (ref.dat, X, cell.type.labels, cell.subtype.labels = NULL, tum.key = NULL, input.type, pseudo.min = 1e-08, alpha = 1, sigma = 2, outlier.cut = 0.01, outlier.fraction = 0.1, gibbs.control = list(chain.length = 1000, burn.in = 500, thinning = 2), opt.control = list(trace = 0, maxit = 10000), n.cores = 1, n.cores.2g = NULL, pdf.name = NULL, first.gibbs.only = F) { if (is.null(colnames(ref.dat))) stop("Error: please specify the gene names of ref.dat!") if (is.null(colnames(X))) stop("Error: please specify the gene names of X!") if (is.null(cell.type.labels)) stop("Error: please specify the cell.types.labels!") if (nrow(ref.dat) != length(cell.type.labels)) stop("Error: nrow(ref.dat) and length(cell.type.labels) need to be the same!") if (is.null(n.cores.2g)) n.cores.2g <- n.cores if (is.null(cell.subtype.labels)) cell.subtype.labels <- cell.type.labels cell.type.labels <- as.character(cell.type.labels) cell.subtype.labels <- as.character(cell.subtype.labels) type.to.subtype.mapping <- unique(cbind(cell.type = cell.type.labels, cell.subtype = cell.subtype.labels)) if (max(table(type.to.subtype.mapping[, "cell.subtype"])) > 1) stop("Error: one or more subtypes belong to multiple cell types!") if (length(unique(cell.type.labels)) > length(unique(cell.subtype.labels))) stop("Error: more cell types than subtypes!") print("removing non-numeric genes...") ref.dat <- ref.dat[, apply(ref.dat, 2, function(ref.dat.gene.i) as.logical(prod(is.numeric(ref.dat.gene.i), is.finite(ref.dat.gene.i))))] X <- X[, apply(X, 2, function(X.gene.i) as.logical(prod(is.numeric(X.gene.i), is.finite(X.gene.i)))), drop = F] print("removing outlier genes...") X.norm <- apply(X, 1, function(vec) vec/sum(vec)) filter.idx <- apply(X.norm > outlier.cut, 1, sum)/ncol(X.norm) > outlier.fraction X <- X[, !filter.idx, drop = F] cat("Number of outlier genes filtered=", sum(filter.idx), "\n") if (!input.type %in% c("scRNA", "GEP")) stop("Error: please specify the correct input.type!") print("aligning reference and mixture...") if (input.type == "GEP") { stopifnot(nrow(ref.dat) == length(cell.type.labels)) processed.dat <- process_GEP(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels) } if (input.type == "scRNA") { stopifnot(nrow(ref.dat) == length(cell.subtype.labels)) processed.dat <- process_scRNA(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels, cell.subtype.labels = cell.subtype.labels) } if (!is.null(tum.key)) { tum.idx <- which(rownames(processed.dat$prior.matched.norm) == tum.key) if (length(tum.idx) == 0) stop("Error: tum.key is not matched to any rownames of the reference, please check the spelling!") processed.dat$prior.matched.norm <- processed.dat$prior.matched.norm[-tum.idx, ] } else print("No tumor reference is speficied. Reference profiles are treated equally.") type.to.subtype.mapping <- type.to.subtype.mapping[match(rownames(processed.dat$ref.matched.norm), type.to.subtype.mapping[, "cell.subtype"]), ] rm(ref.dat, X, cell.type.labels, cell.subtype.labels) gc() ted.res <- run.Ted.main(input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, X = processed.dat$mixture.matched, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores, n.cores.2g = n.cores.2g, first.gibbs.only = first.gibbs.only) para <- list(X = processed.dat$mixture.matched, input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, pseudo.min = pseudo.min, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores) ted.res$para <- para if (!is.null(tum.key)) { Zkg.tum <- ted.res$res$first.gibbs.res$Zkg.tum Zkg.tum.round <- t(round(Zkg.tum)) if.vst <- sum(apply(Zkg.tum.round, 1, min) == 0) < nrow(Zkg.tum.round) if (if.vst & nrow(Zkg.tum.round) > 1) { print("vst transformation is feasible") Zkg.tum.vst <- vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) cor.mat <- get.cormat(Zkg.tum = Zkg.tum.vst) } else { if (nrow(Zkg.tum.round) == 1) print("only one mixture sample. vst transformation is NOT feasible") else print("every gene has at least one zero. vst transformation is NOT feasible") Zkg.tum.vst <- NULL cor.mat <- get.cormat(Zkg.tum = ted.res$res$first.gibbs.res$Zkg.tum.norm) } ted.res$res$first.gibbs.res$Zkg.tum.vst <- Zkg.tum.vst ted.res$res$first.gibbs.res$cor.mat <- cor.mat if (!is.null(pdf.name) & nrow(Zkg.tum.round) > 1) plot.heatmap(dat = cor.mat, pdf.name = pdf.name, cluster = T, self = T, show.value = F, metric = "is.cor") } return(ted.res) } <bytecode: 0x7f3c01e965c8>

On 19 Jan 2022, at 20:56, Tinyi Chu ***@***.***> wrote: Hi Huda, Yes. I think you did not update the package correctly. To check, you can simply type run.Ted in your R console, and see if the argument if.vst is in it. Best, Tinyi On Wed, Jan 19, 2022 at 3:54 PM Moh Huda ***@***.***> wrote: > Dear Tinyi, > > I have updated the package TED in R and have added the argument if.vst = > FALSE in runTED.R function This is to be precise what I have used > run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels > = ***@***.***$seurat_clusters, cell.subtype.labels = > ***@***.***$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = > 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this > error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, > cell.type.labels = ***@***.***$seurat_clusters, : > unused argument (if.vst = FALSE). > 1. I suppose I use the argument incorrectly. a) Then where should this > argument be added then? b) Or is it possible that I might fail in updating > the package which leads to this error message? > > 2. The version of the package TED I got is packageVersion("TED”) [1] > ‘1.1’. Is it the correct one for the most updated? > > > Thank you very much. > > Regards, > > Huda > > On 17 Jan 2022, at 18:36, Tinyi Chu ***@***.***> wrote: > > > > > > *Could you please direct me to the updated version if possible?* > > The github repository was updated yesterday. You may simply follow the > > instructions on https://github.com/Danko-Lab/TED to install (upgrade). > > > > > > *When you said "put if.vst=FALSE in the function argument", you mean > > thefunction run.Ted(..., if.vst=FALSE)?* > > yes > > > > On Mon, Jan 17, 2022 at 1:31 PM Moh Huda ***@***.***> wrote: > > > > > Dear Tinyi, > > > > > > I am currently using the RStudio server and the last time I installed > > > BayesPrism it was quite difficult and I need the admin help to resolve > the > > > issue. > > > > > > Could you please direct me to the updated version if possible? > > > > > > When you said "put if.vst=FALSE in the function argument", you mean the > > > function run.Ted(..., if.vst=FALSE)? > > > > > > I am sorry I am really bad at programming. Thank you for your help and > > > patience. > > > > > > Regards, > > > > > > Huda > > > > > > On Mon, 17 Jan 2022, 18:21 Tinyi Chu, ***@***.***> wrote: > > > > > > > Hi Huda, > > > > > > > > No, you do not need to change the code. You only need to re-install > the > > > > updated package, and put if.vst=FALSE in the function argument. > > > > > > > > Best, > > > > > > > > Tinyi > > > > > > > > On Mon, Jan 17, 2022 at 8:00 AM Moh Huda ***@***.***> wrote: > > > > > > > > > Dear Tinyi, > > > > > > > > > > > > > > > I want to confirm that the line I need to modify is line 335 from > > > > > if(if.vst){ > > > > > becoming if(if.vst=FALSE){ > > > > > > > > > > Is that all? Thank you very much for your help and reply. > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Huda > > > > > > > > > > On Mon, 17 Jan 2022, 07:40 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > > > Hi Moh, > > > > > > > > > > > > Thank you for your question. This seems to be caused by the > sparsity > > > of > > > > > > your simulated data. If you run vst (from the DEseq2 package) on > your > > > > > > dataset, it gives the same error, which means that there are less > > > than > > > > > > 'nsub'(nsub=1000) rows with mean normalized count > 5. > > > > > > > > > > > > I added an argument of if.vst in the run.Ted function, to allow > you > > > to > > > > > > bypass the vst step. Simply set if.vst=FALSE, to disable vst. > > > > > > > > > > > > Let me know if there are any questions. > > > > > > > > > > > > Best, > > > > > > > > > > > > Tinyi > > > > > > > > > > > > > > > > > > On Sat, Jan 15, 2022 at 7:30 PM Moh Huda ***@***.***> wrote: > > > > > > > > > > > > > I have some different types of data (real data, semisynthetic > data, > > > > and > > > > > > > fully synthetic data generated using splatter software). When > > > running > > > > > the > > > > > > > data and got the message "every gene has at least one zero. vst > > > > > > > transformation is NOT feasible”, the running process is > successful. > > > > > > > However, when running different data and got the message "vst > > > > > > > transformation is feasible" the execution failed (running > process > > > > > > failed). > > > > > > > The error message is > > > > > > > > > > > > > > 1. "Error in vst(Zkg.tum.round, nsub = > min(nrow(Zkg.tum.round)/5, > > > > > > > 1000)) : > > > > > > > less than 'nsub' rows with mean normalized count > 5, > > > > > > > it is recommended to use varianceStabilizingTransformation > > > directly". > > > > > > > > > > > > > > I check the file called runTed.R and this command is in line > 335. > > > The > > > > > > > suggestion there said that, > > > > > > > > > > > > > > 1. #adjust nsub, to avoid error when too few genes are used > > > > > > > What I understand that I need to change the function vst() on > the > > > > line > > > > > > > 335 to varianceStabilizingTransformation(), but it does not > work > > > > > either. > > > > > > > Also, I have no idea how to adjust nsub (the suggestion number > 2 > > > > > above). > > > > > > > > > > > > > > Could you please give a suggestion? Thank you. > > > > > > > > > > > > > > I attach the two sample data types. > > > > > > > rstudio-export-2.zip > > > > > > > < > > > https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip > > > > > > > > > > > > > > > > > > > — > > > > > > > Reply to this email directly, view it on GitHub > > > > > > > , or unsubscribe > > > > > > > < > > > > > > > > > > > > > > > > > > > https://github.com/notifications/unsubscribe-auth/AB4NHS26BBA42WZU3PR72NDUWIGTVANCNFSM5MBTIUWA > > > > > > > > > > > > > > . > > > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > > > < > > > > > > > > > > > > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > > > > > or Android > > > > > > > < > > > > > > > > > > > > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > > > >. > > > > > > > > > > > > > > You are receiving this because you are subscribed to this > > > > > thread.Message > > > > > > > ID: ***@***.***> > > > > > > > > > > > > > > > > > > > — > > > > > > Reply to this email directly, view it on GitHub > > > > > > < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 > > > >, > > > > or > > > > > > unsubscribe > > > > > > < > > > > > > > > > > > > > https://github.com/notifications/unsubscribe-auth/AKNZHWZ6PLNPI3O6G2XEEM3UWPBXTANCNFSM5MBTIUWA > > > > > > > > > > > > . > > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > > < > > > > > > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > > > or Android > > > > > > < > > > > > > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > > >. > > > > > > > > > > > > You are receiving this because you authored the thread.Message > ID: > > > > > > ***@***.***> > > > > > > > > > > > > > > > > — > > > > > Reply to this email directly, view it on GitHub > > > > > < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281>, > > > or > > > > > unsubscribe > > > > > < > > > > > > > > https://github.com/notifications/unsubscribe-auth/AB4NHSYRHABU4B3KQD5TIL3UWQHFBANCNFSM5MBTIUWA > > > > > > > > > > . > > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > > < > > > > > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > > > or Android > > > > > < > > > > > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > > >. > > > > > > > > > > You are receiving this because you commented.Message ID: > > > > > ***@***.***> > > > > > > > > > > > > > — > > > > Reply to this email directly, view it on GitHub > > > > < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175>, > or > > > > unsubscribe > > > > < > > > > https://github.com/notifications/unsubscribe-auth/AKNZHW3QW3KHXJ53YUVERQDUWRM37ANCNFSM5MBTIUWA > > > > > > > > . > > > > Triage notifications on the go with GitHub Mobile for iOS > > > > < > > > > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > > > > or Android > > > > < > > > > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > > > >. > > > > > > > > You are receiving this because you authored the thread.Message ID: > > > > ***@***.***> > > > > > > > > > > — > > > Reply to this email directly, view it on GitHub > > > < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754>, > or > > > unsubscribe > > > < > https://github.com/notifications/unsubscribe-auth/AB4NHS6M3WZBH5VIQG6PSJLUWRN6XANCNFSM5MBTIUWA > > > > > . > > > Triage notifications on the go with GitHub Mobile for iOS > > > < > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > > > > > or Android > > > < > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub > >. > > > > > > You are receiving this because you commented.Message ID: > > > ***@***.***> > > > > > — > > Reply to this email directly, view it on GitHub < > https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680>, or > unsubscribe < > https://github.com/notifications/unsubscribe-auth/AKNZHW6477WRGKUN3FUUOJ3UWROUBANCNFSM5MBTIUWA > >. > > Triage notifications on the go with GitHub Mobile for iOS < > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android < > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . > > > You are receiving this because you authored the thread. > > > > — > Reply to this email directly, view it on GitHub > , or > unsubscribe > < https://github.com/notifications/unsubscribe-auth/AB4NHS7F3COPMHUY2IMO7FTUW4QIFANCNFSM5MBTIUWA > . > Triage notifications on the go with GitHub Mobile for iOS > < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android > < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . > > You are receiving this because you commented.Message ID: > ***@***.***> > — Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016861409>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHW4OPACTLEVRYCWTWRDUW4QRLANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016866839, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS6XOG3TQ6PI3JPC4TDUW4RONANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/Danko-Lab/TED/issues/15#issuecomment-1016905928, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKNZHW6ZNFX4RQJFN32G5JTUW4XYPANCNFSM5MBTIUWA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>

tinyi commented 2 years ago

The installation passed tests on my side. Please simply follow standard uninstall and installation procedures. In case it still fails, please forward me the exact error information. Thanks.

On Thu, Jan 20, 2022 at 5:08 AM Moh Huda @.***> wrote:

Dear Tinyi,

I got this email from the admin for the server where I'm using the RStudio for programming.

"Dear Huda

I re-installed the package, but it still said that the installed version is the same as the github version. It refuses to uninstall though. Can you get more details from the author of how to install and uninstall?

As for the crashing problem, I think restarting r-server should fix this. I’ll need to warn those using it first.".

I experienced the R crashing last night after the admin trying to update. He suspected there is something wrong when the update was run. Could you please advise us how to uninstall and reinstall the package correctly and safely?

I really appreciate your help and understanding.

Best regards,

Huda

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Tinyi Chu @.> Sent: Wednesday, January 19, 2022 9:58:31 PM To: Danko-Lab/TED @.> Cc: Moh Huda @.>; Author @.> Subject: Re: [Danko-Lab/TED] vst transformation is feasible, but failed executing the next command (Issue #15)

BayesPrism is not on CRAN yet. I did not update the version for this update. You may simply uninstall and re-install the latest github repository.

On Wed, Jan 19, 2022 at 4:04 PM Moh Huda @.***> wrote:

Dear Tinyi,

Yes indeed, the argument is not in runTED yet. If successful, the argument if.vst should be there, then. However, what is the TED package version for the most updated one so that we can check if the most updated one is the one that is installed? I tried to find this information on your Github account or in the CRAN list but unfortunately I could not find it.

Thank you very much.

Regards,

Huda

run.Ted function (ref.dat, X, cell.type.labels, cell.subtype.labels = NULL, tum.key = NULL, input.type, pseudo.min = 1e-08, alpha = 1, sigma = 2, outlier.cut = 0.01, outlier.fraction = 0.1, gibbs.control = list(chain.length = 1000, burn.in = 500, thinning = 2), opt.control = list(trace = 0, maxit = 10000), n.cores = 1, n.cores.2g = NULL, pdf.name = NULL, first.gibbs.only = F) { if (is.null(colnames(ref.dat))) stop("Error: please specify the gene names of ref.dat!") if (is.null(colnames(X))) stop("Error: please specify the gene names of X!") if (is.null(cell.type.labels)) stop("Error: please specify the cell.types.labels!") if (nrow(ref.dat) != length(cell.type.labels)) stop("Error: nrow(ref.dat) and length(cell.type.labels) need to be the same!") if (is.null(n.cores.2g)) n.cores.2g <- n.cores if (is.null(cell.subtype.labels)) cell.subtype.labels <- cell.type.labels cell.type.labels <- as.character(cell.type.labels) cell.subtype.labels <- as.character(cell.subtype.labels) type.to.subtype.mapping <- unique(cbind(cell.type = cell.type.labels, cell.subtype = cell.subtype.labels)) if (max(table(type.to.subtype.mapping[, "cell.subtype"])) > 1) stop("Error: one or more subtypes belong to multiple cell types!") if (length(unique(cell.type.labels)) > length(unique(cell.subtype.labels))) stop("Error: more cell types than subtypes!") print("removing non-numeric genes...") ref.dat <- ref.dat[, apply(ref.dat, 2, function(ref.dat.gene.i) as.logical(prod(is.numeric(ref.dat.gene.i), is.finite(ref.dat.gene.i))))] X <- X[, apply(X, 2, function(X.gene.i) as.logical(prod(is.numeric(X.gene.i), is.finite(X.gene.i)))), drop = F] print("removing outlier genes...") X.norm <- apply(X, 1, function(vec) vec/sum(vec)) filter.idx <- apply(X.norm > outlier.cut, 1, sum)/ncol(X.norm) > outlier.fraction X <- X[, !filter.idx, drop = F] cat("Number of outlier genes filtered=", sum(filter.idx), "\n") if (!input.type %in% c("scRNA", "GEP")) stop("Error: please specify the correct input.type!") print("aligning reference and mixture...") if (input.type == "GEP") { stopifnot(nrow(ref.dat) == length(cell.type.labels)) processed.dat <- process_GEP(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels) } if (input.type == "scRNA") { stopifnot(nrow(ref.dat) == length(cell.subtype.labels)) processed.dat <- process_scRNA(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels, cell.subtype.labels = cell.subtype.labels) } if (!is.null(tum.key)) { tum.idx <- which(rownames(processed.dat$prior.matched.norm) == tum.key) if (length(tum.idx) == 0) stop("Error: tum.key is not matched to any rownames of the reference, please check the spelling!") processed.dat$prior.matched.norm <- processed.dat$prior.matched.norm[-tum.idx, ] } else print("No tumor reference is speficied. Reference profiles are treated equally.") type.to.subtype.mapping <- type.to.subtype.mapping[match(rownames(processed.dat$ref.matched.norm), type.to.subtype.mapping[, "cell.subtype"]), ] rm(ref.dat, X, cell.type.labels, cell.subtype.labels) gc() ted.res <- run.Ted.main(input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, X = processed.dat$mixture.matched, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores, n.cores.2g = n.cores.2g, first.gibbs.only = first.gibbs.only) para <- list(X = processed.dat$mixture.matched, input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, pseudo.min = pseudo.min, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores) ted.res$para <- para if (!is.null(tum.key)) { Zkg.tum <- ted.res$res$first.gibbs.res$Zkg.tum Zkg.tum.round <- t(round(Zkg.tum)) if.vst <- sum(apply(Zkg.tum.round, 1, min) == 0) < nrow(Zkg.tum.round) if (if.vst & nrow(Zkg.tum.round) > 1) { print("vst transformation is feasible") Zkg.tum.vst <- vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) cor.mat <- get.cormat(Zkg.tum = Zkg.tum.vst) } else { if (nrow(Zkg.tum.round) == 1) print("only one mixture sample. vst transformation is NOT feasible") else print("every gene has at least one zero. vst transformation is NOT feasible") Zkg.tum.vst <- NULL cor.mat <- get.cormat(Zkg.tum = ted.res$res$first.gibbs.res$Zkg.tum.norm) } ted.res$res$first.gibbs.res$Zkg.tum.vst <- Zkg.tum.vst ted.res$res$first.gibbs.res$cor.mat <- cor.mat if (!is.null(pdf.name) & nrow(Zkg.tum.round) > 1) plot.heatmap(dat = cor.mat, pdf.name = pdf.name, cluster = T, self = T, show.value = F, metric = "is.cor") } return(ted.res) } <bytecode: 0x7f3c01e965c8>

On 19 Jan 2022, at 20:56, Tinyi Chu ***@***.***> wrote: Hi Huda, Yes. I think you did not update the package correctly. To check, you can simply type run.Ted in your R console, and see if the argument if.vst is in it. Best, Tinyi On Wed, Jan 19, 2022 at 3:54 PM Moh Huda ***@***.***> wrote: > Dear Tinyi, > > I have updated the package TED in R and have added the argument if.vst = > FALSE in runTED.R function This is to be precise what I have used > run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels > = ***@***.***$seurat_clusters, cell.subtype.labels = > ***@***.***$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = > 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this > error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, > cell.type.labels = ***@***.***$seurat_clusters, : > unused argument (if.vst = FALSE). > 1. I suppose I use the argument incorrectly. a) Then where should this > argument be added then? b) Or is it possible that I might fail in updating > the package which leads to this error message? > > 2. The version of the package TED I got is packageVersion("TED”) [1] > ‘1.1’. Is it the correct one for the most updated? > > > Thank you very much. > > Regards, > > Huda > > On 17 Jan 2022, at 18:36, Tinyi Chu ***@***.***> wrote: > > > > > > *Could you please direct me to the updated version if possible?* > > The github repository was updated yesterday. You may simply follow the > > instructions on https://github.com/Danko-Lab/TED to install (upgrade). > > > > > > *When you said "put if.vst=FALSE in the function argument", you mean > > thefunction run.Ted(..., if.vst=FALSE)?* > > yes > > > > On Mon, Jan 17, 2022 at 1:31 PM Moh Huda ***@***.***> wrote: > > > > > Dear Tinyi, > > > > > > I am currently using the RStudio server and the last time I installed > > > BayesPrism it was quite difficult and I need the admin help to resolve > the > > > issue. > > > > > > Could you please direct me to the updated version if possible? > > > > > > When you said "put if.vst=FALSE in the function argument", you mean the > > > function run.Ted(..., if.vst=FALSE)? > > > > > > I am sorry I am really bad at programming. Thank you for your help and > > > patience. > > > > > > Regards, > > > > > > Huda > > > > > > On Mon, 17 Jan 2022, 18:21 Tinyi Chu, ***@***.***> wrote: > > > > > > > Hi Huda, > > > > > > > > No, you do not need to change the code. You only need to re-install > the > > > > updated package, and put if.vst=FALSE in the function argument. > > > > > > > > Best, > > > > > > > > Tinyi > > > > > > > > On Mon, Jan 17, 2022 at 8:00 AM Moh Huda ***@***.***> wrote: > > > > > > > > > Dear Tinyi, > > > > > > > > > > > > > > > I want to confirm that the line I need to modify is line 335 from > > > > > if(if.vst){ > > > > > becoming if(if.vst=FALSE){ > > > > > > > > > > Is that all? Thank you very much for your help and reply. > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Huda > > > > > > > > > > On Mon, 17 Jan 2022, 07:40 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > > > Hi Moh, > > > > > > > > > > > > Thank you for your question. This seems to be caused by the > sparsity > > > of > > > > > > your simulated data. If you run vst (from the DEseq2 package) on > your > > > > > > dataset, it gives the same error, which means that there are less > > > than > > > > > > 'nsub'(nsub=1000) rows with mean normalized count > 5. > > > > > > > > > > > > I added an argument of if.vst in the run.Ted function, to allow > you > > > to > > > > > > bypass the vst step. Simply set if.vst=FALSE, to disable vst. > > > > > > > > > > > > Let me know if there are any questions. > > > > > > > > > > > > Best, > > > > > > > > > > > > Tinyi > > > > > > > > > > > > > > > > > > On Sat, Jan 15, 2022 at 7:30 PM Moh Huda ***@***.***> wrote: > > > > > > > > > > > > > I have some different types of data (real data, semisynthetic > data, > > > > and > > > > > > > fully synthetic data generated using splatter software). When > > > running > > > > > the > > > > > > > data and got the message "every gene has at least one zero. vst > > > > > > > transformation is NOT feasible”, the running process is > successful. > > > > > > > However, when running different data and got the message "vst > > > > > > > transformation is feasible" the execution failed (running > process > > > > > > failed). > > > > > > > The error message is > > > > > > > > > > > > > > 1. "Error in vst(Zkg.tum.round, nsub = > min(nrow(Zkg.tum.round)/5, > > > > > > > 1000)) : > > > > > > > less than 'nsub' rows with mean normalized count > 5, > > > > > > > it is recommended to use varianceStabilizingTransformation > > > directly". > > > > > > > > > > > > > > I check the file called runTed.R and this command is in line > 335. > > > The > > > > > > > suggestion there said that, > > > > > > > > > > > > > > 1. #adjust nsub, to avoid error when too few genes are used > > > > > > > What I understand that I need to change the function vst() on > the > > > > line > > > > > > > 335 to varianceStabilizingTransformation(), but it does not > work > > > > > either. > > > > > > > Also, I have no idea how to adjust nsub (the suggestion number > 2 > > > > > above). > > > > > > > > > > > > > > Could you please give a suggestion? Thank you. > > > > > > > > > > > > > > I attach the two sample data types. > > > > > > > rstudio-export-2.zip > > > > > > > < > > > https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip > > > > > > > > > > > > > > > > > > > — > > > > > > > Reply to this email directly, view it on GitHub > > > > > > > , or unsubscribe > > > > > > > < > > > > > > > > > > > > > > > > > > >

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub <https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016859717 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016861409>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016866839, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB4NHS6XOG3TQ6PI3JPC4TDUW4RONANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016905928>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AKNZHW6ZNFX4RQJFN32G5JTUW4XYPANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS< https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android< https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017312149, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHSZCACLRPQNI4MRYGVLUW7NHVANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

emkahuda commented 2 years ago

Dear Tinyi,

I got the update from the admin. The message is

"I tired installing again from github, and this time there was no error message saying that the github version was the same as that already installed. I guess an old version was cached somewhere, but you now have the latest release so hopefully this will work."

Although the admin said it is successful, when I checked the runTed.R function, it still has the old function behaviour (without if.vst = FALSE). I had load the package using library(TED), then run the function runTed.R and as expected it was error saying "unused argument (if.vst = False).

The version I got package.version("TED") is 1.1. Could you please advise what might be the problem?

Thank you very much for your help.

Best regards,

Huda

On Thu, 20 Jan 2022, 15:32 Tinyi Chu, @.***> wrote:

The installation passed tests on my side. Please simply follow standard uninstall and installation procedures. In case it still fails, please forward me the exact error information. Thanks.

On Thu, Jan 20, 2022 at 5:08 AM Moh Huda @.***> wrote:

Dear Tinyi,

I got this email from the admin for the server where I'm using the RStudio for programming.

"Dear Huda

I re-installed the package, but it still said that the installed version is the same as the github version. It refuses to uninstall though. Can you get more details from the author of how to install and uninstall?

As for the crashing problem, I think restarting r-server should fix this. I’ll need to warn those using it first.".

I experienced the R crashing last night after the admin trying to update. He suspected there is something wrong when the update was run. Could you please advise us how to uninstall and reinstall the package correctly and safely?

I really appreciate your help and understanding.

Best regards,

Huda

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Tinyi Chu @.> Sent: Wednesday, January 19, 2022 9:58:31 PM To: Danko-Lab/TED @.> Cc: Moh Huda @.>; Author @.> Subject: Re: [Danko-Lab/TED] vst transformation is feasible, but failed executing the next command (Issue #15)

BayesPrism is not on CRAN yet. I did not update the version for this update. You may simply uninstall and re-install the latest github repository.

On Wed, Jan 19, 2022 at 4:04 PM Moh Huda @.***> wrote:

Dear Tinyi,

Yes indeed, the argument is not in runTED yet. If successful, the argument if.vst should be there, then. However, what is the TED package version for the most updated one so that we can check if the most updated one is the one that is installed? I tried to find this information on your Github account or in the CRAN list but unfortunately I could not find it.

Thank you very much.

Regards,

Huda

run.Ted function (ref.dat, X, cell.type.labels, cell.subtype.labels = NULL, tum.key = NULL, input.type, pseudo.min = 1e-08, alpha = 1, sigma = 2, outlier.cut = 0.01, outlier.fraction = 0.1, gibbs.control = list(chain.length = 1000, burn.in = 500, thinning = 2), opt.control = list(trace = 0, maxit = 10000), n.cores = 1, n.cores.2g = NULL, pdf.name = NULL, first.gibbs.only = F) { if (is.null(colnames(ref.dat))) stop("Error: please specify the gene names of ref.dat!") if (is.null(colnames(X))) stop("Error: please specify the gene names of X!") if (is.null(cell.type.labels)) stop("Error: please specify the cell.types.labels!") if (nrow(ref.dat) != length(cell.type.labels)) stop("Error: nrow(ref.dat) and length(cell.type.labels) need to be the same!") if (is.null(n.cores.2g)) n.cores.2g <- n.cores if (is.null(cell.subtype.labels)) cell.subtype.labels <- cell.type.labels cell.type.labels <- as.character(cell.type.labels) cell.subtype.labels <- as.character(cell.subtype.labels) type.to.subtype.mapping <- unique(cbind(cell.type = cell.type.labels, cell.subtype = cell.subtype.labels)) if (max(table(type.to.subtype.mapping[, "cell.subtype"])) > 1) stop("Error: one or more subtypes belong to multiple cell types!") if (length(unique(cell.type.labels)) > length(unique(cell.subtype.labels))) stop("Error: more cell types than subtypes!") print("removing non-numeric genes...") ref.dat <- ref.dat[, apply(ref.dat, 2, function(ref.dat.gene.i) as.logical(prod(is.numeric(ref.dat.gene.i), is.finite(ref.dat.gene.i))))] X <- X[, apply(X, 2, function(X.gene.i) as.logical(prod(is.numeric(X.gene.i), is.finite(X.gene.i)))), drop = F] print("removing outlier genes...") X.norm <- apply(X, 1, function(vec) vec/sum(vec)) filter.idx <- apply(X.norm > outlier.cut, 1, sum)/ncol(X.norm) > outlier.fraction X <- X[, !filter.idx, drop = F] cat("Number of outlier genes filtered=", sum(filter.idx), "\n") if (!input.type %in% c("scRNA", "GEP")) stop("Error: please specify the correct input.type!") print("aligning reference and mixture...") if (input.type == "GEP") { stopifnot(nrow(ref.dat) == length(cell.type.labels)) processed.dat <- process_GEP(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels) } if (input.type == "scRNA") { stopifnot(nrow(ref.dat) == length(cell.subtype.labels)) processed.dat <- process_scRNA(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels, cell.subtype.labels = cell.subtype.labels) } if (!is.null(tum.key)) { tum.idx <- which(rownames(processed.dat$prior.matched.norm) == tum.key) if (length(tum.idx) == 0) stop("Error: tum.key is not matched to any rownames of the reference, please check the spelling!") processed.dat$prior.matched.norm <- processed.dat$prior.matched.norm[-tum.idx, ] } else print("No tumor reference is speficied. Reference profiles are treated equally.") type.to.subtype.mapping <- type.to.subtype.mapping[match(rownames(processed.dat$ref.matched.norm), type.to.subtype.mapping[, "cell.subtype"]), ] rm(ref.dat, X, cell.type.labels, cell.subtype.labels) gc() ted.res <- run.Ted.main(input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, X = processed.dat$mixture.matched, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores, n.cores.2g = n.cores.2g, first.gibbs.only = first.gibbs.only) para <- list(X = processed.dat$mixture.matched, input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, pseudo.min = pseudo.min, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores) ted.res$para <- para if (!is.null(tum.key)) { Zkg.tum <- ted.res$res$first.gibbs.res$Zkg.tum Zkg.tum.round <- t(round(Zkg.tum)) if.vst <- sum(apply(Zkg.tum.round, 1, min) == 0) < nrow(Zkg.tum.round) if (if.vst & nrow(Zkg.tum.round) > 1) { print("vst transformation is feasible") Zkg.tum.vst <- vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) cor.mat <- get.cormat(Zkg.tum = Zkg.tum.vst) } else { if (nrow(Zkg.tum.round) == 1) print("only one mixture sample. vst transformation is NOT feasible") else print("every gene has at least one zero. vst transformation is NOT feasible") Zkg.tum.vst <- NULL cor.mat <- get.cormat(Zkg.tum = ted.res$res$first.gibbs.res$Zkg.tum.norm) } ted.res$res$first.gibbs.res$Zkg.tum.vst <- Zkg.tum.vst ted.res$res$first.gibbs.res$cor.mat <- cor.mat if (!is.null(pdf.name) & nrow(Zkg.tum.round) > 1) plot.heatmap(dat = cor.mat, pdf.name = pdf.name, cluster = T, self = T, show.value = F, metric = "is.cor") } return(ted.res) } <bytecode: 0x7f3c01e965c8>

On 19 Jan 2022, at 20:56, Tinyi Chu ***@***.***> wrote: Hi Huda, Yes. I think you did not update the package correctly. To check, you can simply type run.Ted in your R console, and see if the argument if.vst is in it. Best, Tinyi On Wed, Jan 19, 2022 at 3:54 PM Moh Huda ***@***.***> wrote: > Dear Tinyi, > > I have updated the package TED in R and have added the argument if.vst = > FALSE in runTED.R function This is to be precise what I have used > run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels > = ***@***.***$seurat_clusters, cell.subtype.labels = > ***@***.***$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = > 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this > error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, > cell.type.labels = ***@***.***$seurat_clusters, : > unused argument (if.vst = FALSE). > 1. I suppose I use the argument incorrectly. a) Then where should this > argument be added then? b) Or is it possible that I might fail in updating > the package which leads to this error message? > > 2. The version of the package TED I got is packageVersion("TED”) [1] > ‘1.1’. Is it the correct one for the most updated? > > > Thank you very much. > > Regards, > > Huda > > On 17 Jan 2022, at 18:36, Tinyi Chu ***@***.***> wrote: > > > > > > *Could you please direct me to the updated version if possible?* > > The github repository was updated yesterday. You may simply follow the > > instructions on https://github.com/Danko-Lab/TED to install (upgrade). > > > > > > *When you said "put if.vst=FALSE in the function argument", you mean > > thefunction run.Ted(..., if.vst=FALSE)?* > > yes > > > > On Mon, Jan 17, 2022 at 1:31 PM Moh Huda ***@***.***> wrote: > > > > > Dear Tinyi, > > > > > > I am currently using the RStudio server and the last time I installed > > > BayesPrism it was quite difficult and I need the admin help to resolve > the > > > issue. > > > > > > Could you please direct me to the updated version if possible? > > > > > > When you said "put if.vst=FALSE in the function argument", you mean the > > > function run.Ted(..., if.vst=FALSE)? > > > > > > I am sorry I am really bad at programming. Thank you for your help and > > > patience. > > > > > > Regards, > > > > > > Huda > > > > > > On Mon, 17 Jan 2022, 18:21 Tinyi Chu, ***@***.***> wrote: > > > > > > > Hi Huda, > > > > > > > > No, you do not need to change the code. You only need to re-install > the > > > > updated package, and put if.vst=FALSE in the function argument. > > > > > > > > Best, > > > > > > > > Tinyi > > > > > > > > On Mon, Jan 17, 2022 at 8:00 AM Moh Huda ***@***.***> wrote: > > > > > > > > > Dear Tinyi, > > > > > > > > > > > > > > > I want to confirm that the line I need to modify is line 335 from > > > > > if(if.vst){ > > > > > becoming if(if.vst=FALSE){ > > > > > > > > > > Is that all? Thank you very much for your help and reply. > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Huda > > > > > > > > > > On Mon, 17 Jan 2022, 07:40 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > > > Hi Moh, > > > > > > > > > > > > Thank you for your question. This seems to be caused by the > sparsity > > > of > > > > > > your simulated data. If you run vst (from the DEseq2 package) on > your > > > > > > dataset, it gives the same error, which means that there are less > > > than > > > > > > 'nsub'(nsub=1000) rows with mean normalized count > 5. > > > > > > > > > > > > I added an argument of if.vst in the run.Ted function, to allow > you > > > to > > > > > > bypass the vst step. Simply set if.vst=FALSE, to disable vst. > > > > > > > > > > > > Let me know if there are any questions. > > > > > > > > > > > > Best, > > > > > > > > > > > > Tinyi > > > > > > > > > > > > > > > > > > On Sat, Jan 15, 2022 at 7:30 PM Moh Huda ***@***.***> wrote: > > > > > > > > > > > > > I have some different types of data (real data, semisynthetic > data, > > > > and > > > > > > > fully synthetic data generated using splatter software). When > > > running > > > > > the > > > > > > > data and got the message "every gene has at least one zero. vst > > > > > > > transformation is NOT feasible”, the running process is > successful. > > > > > > > However, when running different data and got the message "vst > > > > > > > transformation is feasible" the execution failed (running > process > > > > > > failed). > > > > > > > The error message is > > > > > > > > > > > > > > 1. "Error in vst(Zkg.tum.round, nsub = > min(nrow(Zkg.tum.round)/5, > > > > > > > 1000)) : > > > > > > > less than 'nsub' rows with mean normalized count > 5, > > > > > > > it is recommended to use varianceStabilizingTransformation > > > directly". > > > > > > > > > > > > > > I check the file called runTed.R and this command is in line > 335. > > > The > > > > > > > suggestion there said that, > > > > > > > > > > > > > > 1. #adjust nsub, to avoid error when too few genes are used > > > > > > > What I understand that I need to change the function vst() on > the > > > > line > > > > > > > 335 to varianceStabilizingTransformation(), but it does not > work > > > > > either. > > > > > > > Also, I have no idea how to adjust nsub (the suggestion number > 2 > > > > > above). > > > > > > > > > > > > > > Could you please give a suggestion? Thank you. > > > > > > > > > > > > > > I attach the two sample data types. > > > > > > > rstudio-export-2.zip > > > > > > > < > > > https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip > > > > > > > > > > > > > > > > > > > — > > > > > > > Reply to this email directly, view it on GitHub > > > > > > > , or unsubscribe > > > > > > > < > > > > > > > > > > > > > > > > > > >

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016859717 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016861409>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016866839, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016905928>, or unsubscribe<

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

. Triage notifications on the go with GitHub Mobile for iOS<

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android<

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017312149, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB4NHSZCACLRPQNI4MRYGVLUW7NHVANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017628340, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNZHW2ZUCJGI4OFESMIPS3UXATKHANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

tinyi commented 2 years ago

please do a uninstall and re-install.

On Thu, Jan 20, 2022 at 3:01 PM Moh Huda @.***> wrote:

Dear Tinyi,

I got the update from the admin. The message is

"I tired installing again from github, and this time there was no error message saying that the github version was the same as that already installed. I guess an old version was cached somewhere, but you now have the latest release so hopefully this will work."

Although the admin said it is successful, when I checked the runTed.R function, it still has the old function behaviour (without if.vst = FALSE). I had load the package using library(TED), then run the function runTed.R and as expected it was error saying "unused argument (if.vst = False).

The version I got package.version("TED") is 1.1. Could you please advise what might be the problem?

Thank you very much for your help.

Best regards,

Huda

On Thu, 20 Jan 2022, 15:32 Tinyi Chu, @.***> wrote:

The installation passed tests on my side. Please simply follow standard uninstall and installation procedures. In case it still fails, please forward me the exact error information. Thanks.

On Thu, Jan 20, 2022 at 5:08 AM Moh Huda @.***> wrote:

Dear Tinyi,

I got this email from the admin for the server where I'm using the RStudio for programming.

"Dear Huda

I re-installed the package, but it still said that the installed version is the same as the github version. It refuses to uninstall though. Can you get more details from the author of how to install and uninstall?

As for the crashing problem, I think restarting r-server should fix this. I’ll need to warn those using it first.".

I experienced the R crashing last night after the admin trying to update. He suspected there is something wrong when the update was run. Could you please advise us how to uninstall and reinstall the package correctly and safely?

I really appreciate your help and understanding.

Best regards,

Huda

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Tinyi Chu @.> Sent: Wednesday, January 19, 2022 9:58:31 PM To: Danko-Lab/TED @.> Cc: Moh Huda @.>; Author @.> Subject: Re: [Danko-Lab/TED] vst transformation is feasible, but failed executing the next command (Issue #15)

BayesPrism is not on CRAN yet. I did not update the version for this update. You may simply uninstall and re-install the latest github repository.

On Wed, Jan 19, 2022 at 4:04 PM Moh Huda @.***> wrote:

Dear Tinyi,

Yes indeed, the argument is not in runTED yet. If successful, the argument if.vst should be there, then. However, what is the TED package version for the most updated one so that we can check if the most updated one is the one that is installed? I tried to find this information on your Github account or in the CRAN list but unfortunately I could not find it.

Thank you very much.

Regards,

Huda

run.Ted function (ref.dat, X, cell.type.labels, cell.subtype.labels = NULL, tum.key = NULL, input.type, pseudo.min = 1e-08, alpha = 1, sigma = 2, outlier.cut = 0.01, outlier.fraction = 0.1, gibbs.control

list(chain.length = 1000, burn.in = 500, thinning = 2), opt.control = list(trace = 0, maxit = 10000), n.cores = 1, n.cores.2g = NULL, pdf.name = NULL, first.gibbs.only = F) { if (is.null(colnames(ref.dat))) stop("Error: please specify the gene names of ref.dat!") if (is.null(colnames(X))) stop("Error: please specify the gene names of X!") if (is.null(cell.type.labels)) stop("Error: please specify the cell.types.labels!") if (nrow(ref.dat) != length(cell.type.labels)) stop("Error: nrow(ref.dat) and length(cell.type.labels) need to be the same!") if (is.null(n.cores.2g)) n.cores.2g <- n.cores if (is.null(cell.subtype.labels)) cell.subtype.labels <- cell.type.labels cell.type.labels <- as.character(cell.type.labels) cell.subtype.labels <- as.character(cell.subtype.labels) type.to.subtype.mapping <- unique(cbind(cell.type = cell.type.labels, cell.subtype = cell.subtype.labels)) if (max(table(type.to.subtype.mapping[, "cell.subtype"])) > 1) stop("Error: one or more subtypes belong to multiple cell types!") if (length(unique(cell.type.labels)) > length(unique(cell.subtype.labels))) stop("Error: more cell types than subtypes!") print("removing non-numeric genes...") ref.dat <- ref.dat[, apply(ref.dat, 2, function(ref.dat.gene.i) as.logical(prod(is.numeric(ref.dat.gene.i), is.finite(ref.dat.gene.i))))] X <- X[, apply(X, 2, function(X.gene.i) as.logical(prod(is.numeric(X.gene.i), is.finite(X.gene.i)))), drop = F] print("removing outlier genes...") X.norm <- apply(X, 1, function(vec) vec/sum(vec)) filter.idx <- apply(X.norm > outlier.cut, 1, sum)/ncol(X.norm) > outlier.fraction X <- X[, !filter.idx, drop = F] cat("Number of outlier genes filtered=", sum(filter.idx), "\n") if (!input.type %in% c("scRNA", "GEP")) stop("Error: please specify the correct input.type!") print("aligning reference and mixture...") if (input.type == "GEP") { stopifnot(nrow(ref.dat) == length(cell.type.labels)) processed.dat <- process_GEP(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels) } if (input.type == "scRNA") { stopifnot(nrow(ref.dat) == length(cell.subtype.labels)) processed.dat <- process_scRNA(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels, cell.subtype.labels = cell.subtype.labels) } if (!is.null(tum.key)) { tum.idx <- which(rownames(processed.dat$prior.matched.norm) == tum.key) if (length(tum.idx) == 0) stop("Error: tum.key is not matched to any rownames of the reference, please check the spelling!") processed.dat$prior.matched.norm <- processed.dat$prior.matched.norm[-tum.idx, ] } else print("No tumor reference is speficied. Reference profiles are treated equally.") type.to.subtype.mapping <-

type.to.subtype.mapping[match(rownames(processed.dat$ref.matched.norm), type.to.subtype.mapping[, "cell.subtype"]), ] rm(ref.dat, X, cell.type.labels, cell.subtype.labels) gc() ted.res <- run.Ted.main(input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, X = processed.dat$mixture.matched, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores, n.cores.2g = n.cores.2g, first.gibbs.only = first.gibbs.only) para <- list(X = processed.dat$mixture.matched, input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, pseudo.min = pseudo.min, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores) ted.res$para <- para if (!is.null(tum.key)) { Zkg.tum <- ted.res$res$first.gibbs.res$Zkg.tum Zkg.tum.round <- t(round(Zkg.tum)) if.vst <- sum(apply(Zkg.tum.round, 1, min) == 0) < nrow(Zkg.tum.round) if (if.vst & nrow(Zkg.tum.round) > 1) { print("vst transformation is feasible") Zkg.tum.vst <- vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) cor.mat <- get.cormat(Zkg.tum = Zkg.tum.vst) } else { if (nrow(Zkg.tum.round) == 1) print("only one mixture sample. vst transformation is NOT feasible") else print("every gene has at least one zero. vst transformation is NOT feasible") Zkg.tum.vst <- NULL cor.mat <- get.cormat(Zkg.tum = ted.res$res$first.gibbs.res$Zkg.tum.norm) } ted.res$res$first.gibbs.res$Zkg.tum.vst <- Zkg.tum.vst ted.res$res$first.gibbs.res$cor.mat <- cor.mat if (!is.null(pdf.name) & nrow(Zkg.tum.round) > 1) plot.heatmap(dat = cor.mat, pdf.name = pdf.name, cluster = T, self = T, show.value = F, metric = "is.cor") } return(ted.res) } <bytecode: 0x7f3c01e965c8>

> On 19 Jan 2022, at 20:56, Tinyi Chu ***@***.***> wrote: > > > Hi Huda, > > Yes. I think you did not update the package correctly. To check, you can > simply type run.Ted in your R console, and see if the argument if.vst is in > it. > > Best, > > Tinyi > > > > On Wed, Jan 19, 2022 at 3:54 PM Moh Huda ***@***.***> wrote: > > > Dear Tinyi, > > > > I have updated the package TED in R and have added the argument if.vst = > > FALSE in runTED.R function This is to be precise what I have used > > run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels > > = ***@***.***$seurat_clusters, cell.subtype.labels = > > ***@***.***$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = > > 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this > > error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, > > cell.type.labels = ***@***.***$seurat_clusters, : > > unused argument (if.vst = FALSE). > > 1. I suppose I use the argument incorrectly. a) Then where should this > > argument be added then? b) Or is it possible that I might fail in updating > > the package which leads to this error message? > > > > 2. The version of the package TED I got is packageVersion("TED”) [1] > > ‘1.1’. Is it the correct one for the most updated? > > > > > > Thank you very much. > > > > Regards, > > > > Huda > > > On 17 Jan 2022, at 18:36, Tinyi Chu ***@***.***> wrote: > > > > > > > > > *Could you please direct me to the updated version if possible?* > > > The github repository was updated yesterday. You may simply follow the > > > instructions on https://github.com/Danko-Lab/TED to install (upgrade). > > > > > > > > > *When you said "put if.vst=FALSE in the function argument", you mean > > > thefunction run.Ted(..., if.vst=FALSE)?* > > > yes > > > > > > On Mon, Jan 17, 2022 at 1:31 PM Moh Huda ***@***.***> wrote: > > > > > > > Dear Tinyi, > > > > > > > > I am currently using the RStudio server and the last time I installed > > > > BayesPrism it was quite difficult and I need the admin help to resolve > > the > > > > issue. > > > > > > > > Could you please direct me to the updated version if possible? > > > > > > > > When you said "put if.vst=FALSE in the function argument", you mean the > > > > function run.Ted(..., if.vst=FALSE)? > > > > > > > > I am sorry I am really bad at programming. Thank you for your help and > > > > patience. > > > > > > > > Regards, > > > > > > > > Huda > > > > > > > > On Mon, 17 Jan 2022, 18:21 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > Hi Huda, > > > > > > > > > > No, you do not need to change the code. You only need to re-install > > the > > > > > updated package, and put if.vst=FALSE in the function argument. > > > > > > > > > > Best, > > > > > > > > > > Tinyi > > > > > > > > > > On Mon, Jan 17, 2022 at 8:00 AM Moh Huda ***@***.***> wrote: > > > > > > > > > > > Dear Tinyi, > > > > > > > > > > > > > > > > > > I want to confirm that the line I need to modify is line 335 from > > > > > > if(if.vst){ > > > > > > becoming if(if.vst=FALSE){ > > > > > > > > > > > > Is that all? Thank you very much for your help and reply. > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > Huda > > > > > > > > > > > > On Mon, 17 Jan 2022, 07:40 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > > > > > Hi Moh, > > > > > > > > > > > > > > Thank you for your question. This seems to be caused by the > > sparsity > > > > of > > > > > > > your simulated data. If you run vst (from the DEseq2 package) on > > your > > > > > > > dataset, it gives the same error, which means that there are less > > > > than > > > > > > > 'nsub'(nsub=1000) rows with mean normalized count > 5. > > > > > > > > > > > > > > I added an argument of if.vst in the run.Ted function, to allow > > you > > > > to > > > > > > > bypass the vst step. Simply set if.vst=FALSE, to disable vst. > > > > > > > > > > > > > > Let me know if there are any questions. > > > > > > > > > > > > > > Best, > > > > > > > > > > > > > > Tinyi > > > > > > > > > > > > > > > > > > > > > On Sat, Jan 15, 2022 at 7:30 PM Moh Huda ***@***.***> wrote: > > > > > > > > > > > > > > > I have some different types of data (real data, semisynthetic > > data, > > > > > and > > > > > > > > fully synthetic data generated using splatter software). When > > > > running > > > > > > the > > > > > > > > data and got the message "every gene has at least one zero. vst > > > > > > > > transformation is NOT feasible”, the running process is > > successful. > > > > > > > > However, when running different data and got the message "vst > > > > > > > > transformation is feasible" the execution failed (running > > process > > > > > > > failed). > > > > > > > > The error message is > > > > > > > > > > > > > > > > 1. "Error in vst(Zkg.tum.round, nsub = > > min(nrow(Zkg.tum.round)/5, > > > > > > > > 1000)) : > > > > > > > > less than 'nsub' rows with mean normalized count > 5, > > > > > > > > it is recommended to use varianceStabilizingTransformation > > > > directly". > > > > > > > > > > > > > > > > I check the file called runTed.R and this command is in line > > 335. > > > > The > > > > > > > > suggestion there said that, > > > > > > > > > > > > > > > > 1. #adjust nsub, to avoid error when too few genes are used > > > > > > > > What I understand that I need to change the function vst() on > > the > > > > > line > > > > > > > > 335 to varianceStabilizingTransformation(), but it does not > > work > > > > > > either. > > > > > > > > Also, I have no idea how to adjust nsub (the suggestion number > > 2 > > > > > > above). > > > > > > > > > > > > > > > > Could you please give a suggestion? Thank you. > > > > > > > > > > > > > > > > I attach the two sample data types. > > > > > > > > rstudio-export-2.zip > > > > > > > > < > > > > https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip > > > > > > > > > > > > > > > > > > > > > > — > > > > > > > > Reply to this email directly, view it on GitHub > > > > > > > > , or unsubscribe > > > > > > > > < > > > > > > > > > > > > > > > > > > > > > > > >

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925

, or

unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281 ,

or

unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016859717 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016861409>, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub <https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016866839 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016905928>, or unsubscribe<

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

. Triage notifications on the go with GitHub Mobile for iOS<

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android<

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017312149, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017628340, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHW2ZUCJGI4OFESMIPS3UXATKHANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017872234, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS6QX77FBCSLRYNLLP3UXBSYNANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

emkahuda commented 2 years ago

Dear Tinyi,

Finally, now I manage to make the function updated. I can see the function for runTed.R is updated now (compared to the old one) and I'm sure it indicates the installation was successful. It's quite tricky, but now all is sorted. Thank you very much for your help and support.

Best regards,

Huda

On Thu, 20 Jan 2022, 20:09 Tinyi Chu, @.***> wrote:

please do a uninstall and re-install.

On Thu, Jan 20, 2022 at 3:01 PM Moh Huda @.***> wrote:

Dear Tinyi,

I got the update from the admin. The message is

"I tired installing again from github, and this time there was no error message saying that the github version was the same as that already installed. I guess an old version was cached somewhere, but you now have the latest release so hopefully this will work."

Although the admin said it is successful, when I checked the runTed.R function, it still has the old function behaviour (without if.vst = FALSE). I had load the package using library(TED), then run the function runTed.R and as expected it was error saying "unused argument (if.vst = False).

The version I got package.version("TED") is 1.1. Could you please advise what might be the problem?

Thank you very much for your help.

Best regards,

Huda

On Thu, 20 Jan 2022, 15:32 Tinyi Chu, @.***> wrote:

The installation passed tests on my side. Please simply follow standard uninstall and installation procedures. In case it still fails, please forward me the exact error information. Thanks.

On Thu, Jan 20, 2022 at 5:08 AM Moh Huda @.***> wrote:

Dear Tinyi,

I got this email from the admin for the server where I'm using the RStudio for programming.

"Dear Huda

I re-installed the package, but it still said that the installed version is the same as the github version. It refuses to uninstall though. Can you get more details from the author of how to install and uninstall?

As for the crashing problem, I think restarting r-server should fix this. I’ll need to warn those using it first.".

I experienced the R crashing last night after the admin trying to update. He suspected there is something wrong when the update was run. Could you please advise us how to uninstall and reinstall the package correctly and safely?

I really appreciate your help and understanding.

Best regards,

Huda

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Tinyi Chu @.> Sent: Wednesday, January 19, 2022 9:58:31 PM To: Danko-Lab/TED @.> Cc: Moh Huda @.>; Author @.> Subject: Re: [Danko-Lab/TED] vst transformation is feasible, but failed executing the next command (Issue #15)

BayesPrism is not on CRAN yet. I did not update the version for this update. You may simply uninstall and re-install the latest github repository.

On Wed, Jan 19, 2022 at 4:04 PM Moh Huda @.***> wrote:

Dear Tinyi,

Yes indeed, the argument is not in runTED yet. If successful, the argument if.vst should be there, then. However, what is the TED package version for the most updated one so that we can check if the most updated one is the one that is installed? I tried to find this information on your Github account or in the CRAN list but unfortunately I could not find it.

Thank you very much.

Regards,

Huda

run.Ted function (ref.dat, X, cell.type.labels, cell.subtype.labels = NULL, tum.key = NULL, input.type, pseudo.min = 1e-08, alpha = 1, sigma = 2, outlier.cut = 0.01, outlier.fraction = 0.1, gibbs.control

list(chain.length = 1000, burn.in = 500, thinning = 2), opt.control = list(trace = 0, maxit = 10000), n.cores = 1, n.cores.2g = NULL, pdf.name = NULL, first.gibbs.only = F) { if (is.null(colnames(ref.dat))) stop("Error: please specify the gene names of ref.dat!") if (is.null(colnames(X))) stop("Error: please specify the gene names of X!") if (is.null(cell.type.labels)) stop("Error: please specify the cell.types.labels!") if (nrow(ref.dat) != length(cell.type.labels)) stop("Error: nrow(ref.dat) and length(cell.type.labels) need to be the same!") if (is.null(n.cores.2g)) n.cores.2g <- n.cores if (is.null(cell.subtype.labels)) cell.subtype.labels <- cell.type.labels cell.type.labels <- as.character(cell.type.labels) cell.subtype.labels <- as.character(cell.subtype.labels) type.to.subtype.mapping <- unique(cbind(cell.type = cell.type.labels, cell.subtype = cell.subtype.labels)) if (max(table(type.to.subtype.mapping[, "cell.subtype"])) > 1) stop("Error: one or more subtypes belong to multiple cell types!") if (length(unique(cell.type.labels)) > length(unique(cell.subtype.labels))) stop("Error: more cell types than subtypes!") print("removing non-numeric genes...") ref.dat <- ref.dat[, apply(ref.dat, 2, function(ref.dat.gene.i) as.logical(prod(is.numeric(ref.dat.gene.i), is.finite(ref.dat.gene.i))))] X <- X[, apply(X, 2, function(X.gene.i) as.logical(prod(is.numeric(X.gene.i), is.finite(X.gene.i)))), drop = F] print("removing outlier genes...") X.norm <- apply(X, 1, function(vec) vec/sum(vec)) filter.idx <- apply(X.norm > outlier.cut, 1, sum)/ncol(X.norm) > outlier.fraction X <- X[, !filter.idx, drop = F] cat("Number of outlier genes filtered=", sum(filter.idx), "\n") if (!input.type %in% c("scRNA", "GEP")) stop("Error: please specify the correct input.type!") print("aligning reference and mixture...") if (input.type == "GEP") { stopifnot(nrow(ref.dat) == length(cell.type.labels)) processed.dat <- process_GEP(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels) } if (input.type == "scRNA") { stopifnot(nrow(ref.dat) == length(cell.subtype.labels)) processed.dat <- process_scRNA(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels, cell.subtype.labels = cell.subtype.labels) } if (!is.null(tum.key)) { tum.idx <- which(rownames(processed.dat$prior.matched.norm) == tum.key) if (length(tum.idx) == 0) stop("Error: tum.key is not matched to any rownames of the reference, please check the spelling!") processed.dat$prior.matched.norm <- processed.dat$prior.matched.norm[-tum.idx, ] } else print("No tumor reference is speficied. Reference profiles are treated equally.") type.to.subtype.mapping <-

type.to.subtype.mapping[match(rownames(processed.dat$ref.matched.norm), type.to.subtype.mapping[, "cell.subtype"]), ] rm(ref.dat, X, cell.type.labels, cell.subtype.labels) gc() ted.res <- run.Ted.main(input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, X = processed.dat$mixture.matched, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores, n.cores.2g = n.cores.2g, first.gibbs.only = first.gibbs.only) para <- list(X = processed.dat$mixture.matched, input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, pseudo.min = pseudo.min, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores) ted.res$para <- para if (!is.null(tum.key)) { Zkg.tum <- ted.res$res$first.gibbs.res$Zkg.tum Zkg.tum.round <- t(round(Zkg.tum)) if.vst <- sum(apply(Zkg.tum.round, 1, min) == 0) < nrow(Zkg.tum.round) if (if.vst & nrow(Zkg.tum.round) > 1) { print("vst transformation is feasible") Zkg.tum.vst <- vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) cor.mat <- get.cormat(Zkg.tum = Zkg.tum.vst) } else { if (nrow(Zkg.tum.round) == 1) print("only one mixture sample. vst transformation is NOT feasible") else print("every gene has at least one zero. vst transformation is NOT feasible") Zkg.tum.vst <- NULL cor.mat <- get.cormat(Zkg.tum = ted.res$res$first.gibbs.res$Zkg.tum.norm) } ted.res$res$first.gibbs.res$Zkg.tum.vst <- Zkg.tum.vst ted.res$res$first.gibbs.res$cor.mat <- cor.mat if (!is.null(pdf.name) & nrow(Zkg.tum.round) > 1) plot.heatmap(dat = cor.mat, pdf.name = pdf.name, cluster = T, self = T, show.value = F, metric = "is.cor") } return(ted.res) } <bytecode: 0x7f3c01e965c8>

> On 19 Jan 2022, at 20:56, Tinyi Chu ***@***.***> wrote: > > > Hi Huda, > > Yes. I think you did not update the package correctly. To check, you can > simply type run.Ted in your R console, and see if the argument if.vst is in > it. > > Best, > > Tinyi > > > > On Wed, Jan 19, 2022 at 3:54 PM Moh Huda ***@***.***> wrote: > > > Dear Tinyi, > > > > I have updated the package TED in R and have added the argument if.vst = > > FALSE in runTED.R function This is to be precise what I have used > > run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels > > = ***@***.***$seurat_clusters, cell.subtype.labels = > > ***@***.***$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = > > 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this > > error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, > > cell.type.labels = ***@***.***$seurat_clusters, : > > unused argument (if.vst = FALSE). > > 1. I suppose I use the argument incorrectly. a) Then where should this > > argument be added then? b) Or is it possible that I might fail in updating > > the package which leads to this error message? > > > > 2. The version of the package TED I got is packageVersion("TED”) [1] > > ‘1.1’. Is it the correct one for the most updated? > > > > > > Thank you very much. > > > > Regards, > > > > Huda > > > On 17 Jan 2022, at 18:36, Tinyi Chu ***@***.***> wrote: > > > > > > > > > *Could you please direct me to the updated version if possible?* > > > The github repository was updated yesterday. You may simply follow the > > > instructions on https://github.com/Danko-Lab/TED to install (upgrade). > > > > > > > > > *When you said "put if.vst=FALSE in the function argument", you mean > > > thefunction run.Ted(..., if.vst=FALSE)?* > > > yes > > > > > > On Mon, Jan 17, 2022 at 1:31 PM Moh Huda ***@***.***> wrote: > > > > > > > Dear Tinyi, > > > > > > > > I am currently using the RStudio server and the last time I installed > > > > BayesPrism it was quite difficult and I need the admin help to resolve > > the > > > > issue. > > > > > > > > Could you please direct me to the updated version if possible? > > > > > > > > When you said "put if.vst=FALSE in the function argument", you mean the > > > > function run.Ted(..., if.vst=FALSE)? > > > > > > > > I am sorry I am really bad at programming. Thank you for your help and > > > > patience. > > > > > > > > Regards, > > > > > > > > Huda > > > > > > > > On Mon, 17 Jan 2022, 18:21 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > Hi Huda, > > > > > > > > > > No, you do not need to change the code. You only need to re-install > > the > > > > > updated package, and put if.vst=FALSE in the function argument. > > > > > > > > > > Best, > > > > > > > > > > Tinyi > > > > > > > > > > On Mon, Jan 17, 2022 at 8:00 AM Moh Huda ***@***.***> wrote: > > > > > > > > > > > Dear Tinyi, > > > > > > > > > > > > > > > > > > I want to confirm that the line I need to modify is line 335 from > > > > > > if(if.vst){ > > > > > > becoming if(if.vst=FALSE){ > > > > > > > > > > > > Is that all? Thank you very much for your help and reply. > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > Huda > > > > > > > > > > > > On Mon, 17 Jan 2022, 07:40 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > > > > > Hi Moh, > > > > > > > > > > > > > > Thank you for your question. This seems to be caused by the > > sparsity > > > > of > > > > > > > your simulated data. If you run vst (from the DEseq2 package) on > > your > > > > > > > dataset, it gives the same error, which means that there are less > > > > than > > > > > > > 'nsub'(nsub=1000) rows with mean normalized count > 5. > > > > > > > > > > > > > > I added an argument of if.vst in the run.Ted function, to allow > > you > > > > to > > > > > > > bypass the vst step. Simply set if.vst=FALSE, to disable vst. > > > > > > > > > > > > > > Let me know if there are any questions. > > > > > > > > > > > > > > Best, > > > > > > > > > > > > > > Tinyi > > > > > > > > > > > > > > > > > > > > > On Sat, Jan 15, 2022 at 7:30 PM Moh Huda ***@***.***> wrote: > > > > > > > > > > > > > > > I have some different types of data (real data, semisynthetic > > data, > > > > > and > > > > > > > > fully synthetic data generated using splatter software). When > > > > running > > > > > > the > > > > > > > > data and got the message "every gene has at least one zero. vst > > > > > > > > transformation is NOT feasible”, the running process is > > successful. > > > > > > > > However, when running different data and got the message "vst > > > > > > > > transformation is feasible" the execution failed (running > > process > > > > > > > failed). > > > > > > > > The error message is > > > > > > > > > > > > > > > > 1. "Error in vst(Zkg.tum.round, nsub = > > min(nrow(Zkg.tum.round)/5, > > > > > > > > 1000)) : > > > > > > > > less than 'nsub' rows with mean normalized count > 5, > > > > > > > > it is recommended to use varianceStabilizingTransformation > > > > directly". > > > > > > > > > > > > > > > > I check the file called runTed.R and this command is in line > > 335. > > > > The > > > > > > > > suggestion there said that, > > > > > > > > > > > > > > > > 1. #adjust nsub, to avoid error when too few genes are used > > > > > > > > What I understand that I need to change the function vst() on > > the > > > > > line > > > > > > > > 335 to varianceStabilizingTransformation(), but it does not > > work > > > > > > either. > > > > > > > > Also, I have no idea how to adjust nsub (the suggestion number > > 2 > > > > > > above). > > > > > > > > > > > > > > > > Could you please give a suggestion? Thank you. > > > > > > > > > > > > > > > > I attach the two sample data types. > > > > > > > > rstudio-export-2.zip > > > > > > > > < > > > > https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip > > > > > > > > > > > > > > > > > > > > > > — > > > > > > > > Reply to this email directly, view it on GitHub > > > > > > > > , or unsubscribe > > > > > > > > < > > > > > > > > > > > > > > > > > > > > > > > >

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925

, or

unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281 ,

or

unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016859717 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016861409 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016866839 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016905928>, or unsubscribe<

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

. Triage notifications on the go with GitHub Mobile for iOS<

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android<

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017312149 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017628340, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017872234, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB4NHS6QX77FBCSLRYNLLP3UXBSYNANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017878739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNZHW7ZRCS4HU6BQ2VQE6DUXBTXZANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

tinyi commented 2 years ago

You are welcome.

On Thu, Jan 20, 2022 at 6:40 PM Moh Huda @.***> wrote:

Dear Tinyi,

Finally, now I manage to make the function updated. I can see the function for runTed.R is updated now (compared to the old one) and I'm sure it indicates the installation was successful. It's quite tricky, but now all is sorted. Thank you very much for your help and support.

Best regards,

Huda

On Thu, 20 Jan 2022, 20:09 Tinyi Chu, @.***> wrote:

please do a uninstall and re-install.

On Thu, Jan 20, 2022 at 3:01 PM Moh Huda @.***> wrote:

Dear Tinyi,

I got the update from the admin. The message is

"I tired installing again from github, and this time there was no error message saying that the github version was the same as that already installed. I guess an old version was cached somewhere, but you now have the latest release so hopefully this will work."

Although the admin said it is successful, when I checked the runTed.R function, it still has the old function behaviour (without if.vst = FALSE). I had load the package using library(TED), then run the function runTed.R and as expected it was error saying "unused argument (if.vst = False).

The version I got package.version("TED") is 1.1. Could you please advise what might be the problem?

Thank you very much for your help.

Best regards,

Huda

On Thu, 20 Jan 2022, 15:32 Tinyi Chu, @.***> wrote:

The installation passed tests on my side. Please simply follow standard uninstall and installation procedures. In case it still fails, please forward me the exact error information. Thanks.

On Thu, Jan 20, 2022 at 5:08 AM Moh Huda @.***> wrote:

Dear Tinyi,

I got this email from the admin for the server where I'm using the RStudio for programming.

"Dear Huda

I re-installed the package, but it still said that the installed version is the same as the github version. It refuses to uninstall though. Can you get more details from the author of how to install and uninstall?

As for the crashing problem, I think restarting r-server should fix this. I’ll need to warn those using it first.".

I experienced the R crashing last night after the admin trying to update. He suspected there is something wrong when the update was run. Could you please advise us how to uninstall and reinstall the package correctly and safely?

I really appreciate your help and understanding.

Best regards,

Huda

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Tinyi Chu @.> Sent: Wednesday, January 19, 2022 9:58:31 PM To: Danko-Lab/TED @.> Cc: Moh Huda @.>; Author @.> Subject: Re: [Danko-Lab/TED] vst transformation is feasible, but failed executing the next command (Issue #15)

BayesPrism is not on CRAN yet. I did not update the version for this update. You may simply uninstall and re-install the latest github repository.

On Wed, Jan 19, 2022 at 4:04 PM Moh Huda @.***> wrote:

Dear Tinyi,

Yes indeed, the argument is not in runTED yet. If successful, the argument if.vst should be there, then. However, what is the TED package version for the most updated one so that we can check if the most updated one is the one that is installed? I tried to find this information on your Github account or in the CRAN list but unfortunately I could not find it.

Thank you very much.

Regards,

Huda

run.Ted function (ref.dat, X, cell.type.labels, cell.subtype.labels = NULL, tum.key = NULL, input.type, pseudo.min = 1e-08, alpha = 1, sigma = 2, outlier.cut = 0.01, outlier.fraction = 0.1, gibbs.control

list(chain.length = 1000, burn.in = 500, thinning = 2), opt.control = list(trace = 0, maxit = 10000), n.cores = 1, n.cores.2g = NULL, pdf.name = NULL, first.gibbs.only = F) { if (is.null(colnames(ref.dat))) stop("Error: please specify the gene names of ref.dat!") if (is.null(colnames(X))) stop("Error: please specify the gene names of X!") if (is.null(cell.type.labels)) stop("Error: please specify the cell.types.labels!") if (nrow(ref.dat) != length(cell.type.labels)) stop("Error: nrow(ref.dat) and length(cell.type.labels) need to be the same!") if (is.null(n.cores.2g)) n.cores.2g <- n.cores if (is.null(cell.subtype.labels)) cell.subtype.labels <- cell.type.labels cell.type.labels <- as.character(cell.type.labels) cell.subtype.labels <- as.character(cell.subtype.labels) type.to.subtype.mapping <- unique(cbind(cell.type = cell.type.labels, cell.subtype = cell.subtype.labels)) if (max(table(type.to.subtype.mapping[, "cell.subtype"])) > 1) stop("Error: one or more subtypes belong to multiple cell types!") if (length(unique(cell.type.labels)) > length(unique(cell.subtype.labels))) stop("Error: more cell types than subtypes!") print("removing non-numeric genes...") ref.dat <- ref.dat[, apply(ref.dat, 2, function(ref.dat.gene.i) as.logical(prod(is.numeric(ref.dat.gene.i), is.finite(ref.dat.gene.i))))] X <- X[, apply(X, 2, function(X.gene.i) as.logical(prod(is.numeric(X.gene.i), is.finite(X.gene.i)))), drop = F] print("removing outlier genes...") X.norm <- apply(X, 1, function(vec) vec/sum(vec)) filter.idx <- apply(X.norm > outlier.cut, 1, sum)/ncol(X.norm) > outlier.fraction X <- X[, !filter.idx, drop = F] cat("Number of outlier genes filtered=", sum(filter.idx), "\n") if (!input.type %in% c("scRNA", "GEP")) stop("Error: please specify the correct input.type!") print("aligning reference and mixture...") if (input.type == "GEP") { stopifnot(nrow(ref.dat) == length(cell.type.labels)) processed.dat <- process_GEP(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels) } if (input.type == "scRNA") { stopifnot(nrow(ref.dat) == length(cell.subtype.labels)) processed.dat <- process_scRNA(ref = ref.dat, mixture = X, pseudo.min = pseudo.min, cell.type.labels = cell.type.labels, cell.subtype.labels = cell.subtype.labels) } if (!is.null(tum.key)) { tum.idx <- which(rownames(processed.dat$prior.matched.norm) == tum.key) if (length(tum.idx) == 0) stop("Error: tum.key is not matched to any rownames of the reference, please check the spelling!") processed.dat$prior.matched.norm <- processed.dat$prior.matched.norm[-tum.idx, ] } else print("No tumor reference is speficied. Reference profiles are treated equally.") type.to.subtype.mapping <-

type.to.subtype.mapping[match(rownames(processed.dat$ref.matched.norm), type.to.subtype.mapping[, "cell.subtype"]), ] rm(ref.dat, X, cell.type.labels, cell.subtype.labels) gc() ted.res <- run.Ted.main(input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, X = processed.dat$mixture.matched, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores, n.cores.2g = n.cores.2g, first.gibbs.only = first.gibbs.only) para <- list(X = processed.dat$mixture.matched, input.phi = processed.dat$ref.matched.norm, input.phi.prior = processed.dat$prior.matched.norm, tum.key = tum.key, type.to.subtype.mapping = type.to.subtype.mapping, alpha = alpha, sigma = sigma, pseudo.min = pseudo.min, gibbs.control = gibbs.control, opt.control = opt.control, n.cores = n.cores) ted.res$para <- para if (!is.null(tum.key)) { Zkg.tum <- ted.res$res$first.gibbs.res$Zkg.tum Zkg.tum.round <- t(round(Zkg.tum)) if.vst <- sum(apply(Zkg.tum.round, 1, min) == 0) < nrow(Zkg.tum.round) if (if.vst & nrow(Zkg.tum.round) > 1) { print("vst transformation is feasible") Zkg.tum.vst <- vst(Zkg.tum.round, nsub = min(nrow(Zkg.tum.round)/5, 1000)) cor.mat <- get.cormat(Zkg.tum = Zkg.tum.vst) } else { if (nrow(Zkg.tum.round) == 1) print("only one mixture sample. vst transformation is NOT feasible") else print("every gene has at least one zero. vst transformation is NOT feasible") Zkg.tum.vst <- NULL cor.mat <- get.cormat(Zkg.tum = ted.res$res$first.gibbs.res$Zkg.tum.norm) } ted.res$res$first.gibbs.res$Zkg.tum.vst <- Zkg.tum.vst ted.res$res$first.gibbs.res$cor.mat <- cor.mat if (!is.null(pdf.name) & nrow(Zkg.tum.round) > 1) plot.heatmap(dat = cor.mat, pdf.name = pdf.name, cluster = T, self = T, show.value = F, metric = "is.cor") } return(ted.res) } <bytecode: 0x7f3c01e965c8>

> On 19 Jan 2022, at 20:56, Tinyi Chu ***@***.***> wrote: > > > Hi Huda, > > Yes. I think you did not update the package correctly. To check, you can > simply type run.Ted in your R console, and see if the argument if.vst is in > it. > > Best, > > Tinyi > > > > On Wed, Jan 19, 2022 at 3:54 PM Moh Huda ***@***.***> wrote: > > > Dear Tinyi, > > > > I have updated the package TED in R and have added the argument if.vst = > > FALSE in runTED.R function This is to be precise what I have used > > run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, cell.type.labels > > = ***@***.***$seurat_clusters, cell.subtype.labels = > > ***@***.***$seurat_clusters, tum.key = "1", input.type = "scRNA", n.cores = > > 20, pdf.name = "tcga.tumor.synthetic", if.vst=FALSE). However, I got this > > error Error in run.Ted(ref.dat = filter_gene_scRNA_data, X = chosen_data, > > cell.type.labels = ***@***.***$seurat_clusters, : > > unused argument (if.vst = FALSE). > > 1. I suppose I use the argument incorrectly. a) Then where should this > > argument be added then? b) Or is it possible that I might fail in updating > > the package which leads to this error message? > > > > 2. The version of the package TED I got is packageVersion("TED”) [1] > > ‘1.1’. Is it the correct one for the most updated? > > > > > > Thank you very much. > > > > Regards, > > > > Huda > > > On 17 Jan 2022, at 18:36, Tinyi Chu ***@***.***> wrote: > > > > > > > > > *Could you please direct me to the updated version if possible?* > > > The github repository was updated yesterday. You may simply follow the > > > instructions on https://github.com/Danko-Lab/TED to install (upgrade). > > > > > > > > > *When you said "put if.vst=FALSE in the function argument", you mean > > > thefunction run.Ted(..., if.vst=FALSE)?* > > > yes > > > > > > On Mon, Jan 17, 2022 at 1:31 PM Moh Huda ***@***.***> wrote: > > > > > > > Dear Tinyi, > > > > > > > > I am currently using the RStudio server and the last time I installed > > > > BayesPrism it was quite difficult and I need the admin help to resolve > > the > > > > issue. > > > > > > > > Could you please direct me to the updated version if possible? > > > > > > > > When you said "put if.vst=FALSE in the function argument", you mean the > > > > function run.Ted(..., if.vst=FALSE)? > > > > > > > > I am sorry I am really bad at programming. Thank you for your help and > > > > patience. > > > > > > > > Regards, > > > > > > > > Huda > > > > > > > > On Mon, 17 Jan 2022, 18:21 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > Hi Huda, > > > > > > > > > > No, you do not need to change the code. You only need to re-install > > the > > > > > updated package, and put if.vst=FALSE in the function argument. > > > > > > > > > > Best, > > > > > > > > > > Tinyi > > > > > > > > > > On Mon, Jan 17, 2022 at 8:00 AM Moh Huda ***@***.***> wrote: > > > > > > > > > > > Dear Tinyi, > > > > > > > > > > > > > > > > > > I want to confirm that the line I need to modify is line 335 from > > > > > > if(if.vst){ > > > > > > becoming if(if.vst=FALSE){ > > > > > > > > > > > > Is that all? Thank you very much for your help and reply. > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > Huda > > > > > > > > > > > > On Mon, 17 Jan 2022, 07:40 Tinyi Chu, ***@***.***> wrote: > > > > > > > > > > > > > Hi Moh, > > > > > > > > > > > > > > Thank you for your question. This seems to be caused by the > > sparsity > > > > of > > > > > > > your simulated data. If you run vst (from the DEseq2 package) on > > your > > > > > > > dataset, it gives the same error, which means that there are less > > > > than > > > > > > > 'nsub'(nsub=1000) rows with mean normalized count > 5. > > > > > > > > > > > > > > I added an argument of if.vst in the run.Ted function, to allow > > you > > > > to > > > > > > > bypass the vst step. Simply set if.vst=FALSE, to disable vst. > > > > > > > > > > > > > > Let me know if there are any questions. > > > > > > > > > > > > > > Best, > > > > > > > > > > > > > > Tinyi > > > > > > > > > > > > > > > > > > > > > On Sat, Jan 15, 2022 at 7:30 PM Moh Huda ***@***.***> wrote: > > > > > > > > > > > > > > > I have some different types of data (real data, semisynthetic > > data, > > > > > and > > > > > > > > fully synthetic data generated using splatter software). When > > > > running > > > > > > the > > > > > > > > data and got the message "every gene has at least one zero. vst > > > > > > > > transformation is NOT feasible”, the running process is > > successful. > > > > > > > > However, when running different data and got the message "vst > > > > > > > > transformation is feasible" the execution failed (running > > process > > > > > > > failed). > > > > > > > > The error message is > > > > > > > > > > > > > > > > 1. "Error in vst(Zkg.tum.round, nsub = > > min(nrow(Zkg.tum.round)/5, > > > > > > > > 1000)) : > > > > > > > > less than 'nsub' rows with mean normalized count

5,

it is recommended to use varianceStabilizingTransformation directly".

I check the file called runTed.R and this command is in line 335. The suggestion there said that,

  1. adjust nsub, to avoid error when too few

    genes are used What I understand that I need to change the function vst() on the line 335 to varianceStabilizingTransformation(), but it does not work either. Also, I have no idea how to adjust nsub (the suggestion number 2 above).

Could you please give a suggestion? Thank you.

I attach the two sample data types. rstudio-export-2.zip <

https://github.com/Danko-Lab/TED/files/7876152/rstudio-export-2.zip

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014223925

, or

unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014502281 ,

or

unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014797175 ,

or

unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014802754 ,

or

unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1014805680 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016859717 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016861409 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016866839 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub< https://github.com/Danko-Lab/TED/issues/15#issuecomment-1016905928 , or unsubscribe<

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

. Triage notifications on the go with GitHub Mobile for iOS<

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android<

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017312149 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017628340 , or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017872234, or unsubscribe <

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

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1017878739, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKNZHW7ZRCS4HU6BQ2VQE6DUXBTXZANCNFSM5MBTIUWA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/Danko-Lab/TED/issues/15#issuecomment-1018023191, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4NHS3Z2ZQZATZVPUIJCITUXCMORANCNFSM5MBTIUWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>