Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting count matrix #48

Closed
hyunhwan-jeong opened this issue Jun 2, 2017 · 16 comments
Closed

Exporting count matrix #48

hyunhwan-jeong opened this issue Jun 2, 2017 · 16 comments
Milestone

Comments

@hyunhwan-jeong
Copy link

Hello,

I am wondering how I can export the count matrix which is derived from the input parameters. I just only able to have the values of screening performance of the given simulated study as the output of Crispulator. Are you providing any output/function which reveals the count matrix of each sample? If it is not then could you advise me to implement the function?

Thank you,

@tlnagy
Copy link
Owner

tlnagy commented Jun 2, 2017

Could you clarify what you mean by the count matrix?

@hyunhwan-jeong
Copy link
Author

Oh sorry, I would explain it clearly. Crispulator simulates the deep sequencing, and we can have read numbers of each sgRNA for low/high reporter bin. I want to have the read numbers once I run the tool, and I called it count matrix because we can have the sgRNA read numbers for each bin with the form of n x 2 matrix (n is the number of sgRNA, and columns are for low/high bin). I hope I clarify it well.

Thank you

@tlnagy
Copy link
Owner

tlnagy commented Jun 5, 2017

Sorry for not getting back to you sooner. Crispulator does generate your count matrix, but doesn't export it currently. It should be relatively easy to add.

@tlnagy tlnagy added this to the v0.2 milestone Jun 5, 2017
@hyunhwan-jeong
Copy link
Author

Hello @tlnagy,

I recently realized that you provide the bc_counts data frame, and it stores counts of each sgRNA from the high-throughput sequencing. Therefore, I think you don't have to add any additional function or script. Please correct me if I am wrong or close this issue if it is otherwise. I thank you for your attention to this request and I congratulate your recent publication of this great tool in the journal!

Thank you,

@tlnagy
Copy link
Owner

tlnagy commented Feb 7, 2018

Let me know if bc_counts worked for you! If not, please open a new issue. I'm going to add an example to the docs based on your example in #52. I think it would help others in the future!

@tlnagy tlnagy closed this as completed Feb 7, 2018
@hyunhwan-jeong
Copy link
Author

I think it is a kind of okay if I want to build single counts for each group. However, I'd like to have any idea how to build the matrix under below conditions:

  • Generate another bc_counts of un/pre-sorted cells with keeping counts of the high and low.
  • Generate multiple replicates under the same configuration, I did it before, but not 100% sure my method is correct.

Thank you,

Hyun-Hwan Jeong

@tlnagy
Copy link
Owner

tlnagy commented Feb 8, 2018

Generate another bc_counts of un/pre-sorted cells with keeping counts of the high and low.

Are you simulating a FACS Screen?

@hyunhwan-jeong
Copy link
Author

Are you simulating a FACS Screen?

Yes, for the case.

@tlnagy
Copy link
Owner

tlnagy commented Feb 9, 2018

Generate another bc_counts of un/pre-sorted cells with keeping counts of the high and low.

I realized that obs_phenotype was supposed to serve this purpose so I reverted the previous commit that deleted it. I fleshed out the docs further. http://tamasnagy.com/Crispulator.jl/latest/custom.html#Performing-the-screen-1 should help you with getting the observed phenotype, i.e. the phenotype on which the cells were sorted with FACS

EDIT: It sounds like you obs_phenotype for each individual cell, not on a per-guide level basis, correct?

I think that would involve exporting observed:

observed = zeros(n_cells)
@inbounds for i in 1:n_cells
observed[i] = rand(Normal(cell_phenotypes[i], σ))

@tlnagy tlnagy reopened this Feb 9, 2018
@hyunhwan-jeong
Copy link
Author

Hello @tlnagy,
Thanks for your reply, but I do not want to have cell count, and my language made you confused. My question must be corrected as "Can we have read counts for sgRNA for [0,100%] bin or [25%,75%] bin?". I wanted to simulate a CRISPRn experiment like 1. In Figure 1 of the [1], you can see they collected and sequenced for "unsorted cells". Hope it makes you clear now.

Thank you and Best,

Hyun-Hwan Jeong

@tlnagy
Copy link
Owner

tlnagy commented Feb 9, 2018

I see what you want. So I've had to rearchitect differences_between_bins to support this approach. It's almost ready. I'll push a PR once I'm done.

@hyunhwan-jeong
Copy link
Author

I appreciate your support!

Kind Regards,

Hyun-Hwan Jeong

tlnagy added a commit that referenced this issue Feb 9, 2018
@tlnagy
Copy link
Owner

tlnagy commented Feb 9, 2018

Hey @hyunhwaj, if you get a chance can you check out the notebook in #53? It has the Unsorted, GFP_low, GFP_high bins that you were looking for. Let me know over there if it works for you.

You should be able to check it out using

git fetch origin pull/53/head:add-multibin-support
git checkout add-multibin-support

in the Crispulator directory

@tlnagy
Copy link
Owner

tlnagy commented Feb 13, 2018

I merged #53 into master so now you should be able to run

Pkg.checkout("Crispulator")

to give it a spin. Please open a new issue if you run into any issues or have suggestions!

@tlnagy tlnagy closed this as completed Feb 13, 2018
@hyunhwan-jeong
Copy link
Author

That's actually what I've wanted! I checked the notebook, and this ran without any problem. I truly appreciate your work.

Hyun-Hwan Jeong

@tlnagy
Copy link
Owner

tlnagy commented Feb 16, 2018

Thanks! Let me know if you need anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants