r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq
GNU General Public License v3.0
301 stars 125 forks source link

guideline for barcode selection #93

Open hjack123 opened 5 years ago

hjack123 commented 5 years ago

Hi,

Wondering if there is a guideline setting the UMI and promoter ration thresholds for barcodes selection? Thanks!!

r3fang commented 5 years ago

Hello.

The selection of cutoff is quite subjective and maybe sample specific. Usually the high-quality population will be located at the upper right corner of this plot, separating from the low quality barcodes. you might have to choose the cutoff by eyes. The cutoff I find is quite useful is 3.5-5 for logUMI and 0.15 to 0.8 for promoter ratio.

Sent from my iPhone

On Sep 10, 2019, at 4:41 PM, hjack123 notifications@github.com wrote:

Hi,

Wondering if there is a guideline setting the UMI and promoter ration thresholds for barcodes selection? Thanks!!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

hjack123 commented 5 years ago

Thank you very much for your reply!!

hjack123 commented 5 years ago

Also if i may, wondering which step is eliminating potential multiplets? thanks!!

r3fang commented 5 years ago

Currently the pipeline does not deal with doublers. But you can apply Scrumblet to remove putative doublets.

Sent from my iPhone

On Sep 12, 2019, at 4:56 PM, hjack123 notifications@github.com wrote:

Also if i may, wondering which step is eliminating potential multiplets? thanks!!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

hjack123 commented 5 years ago

tried googling but couldnt find Scrumblet, would you mind sharing the link? thanks

r3fang commented 5 years ago

Here you go

https://www.cell.com/cell-systems/pdfExtended/S2405-4712(18)30474-5 https://www.cell.com/cell-systems/pdfExtended/S2405-4712(18)30474-5

-- Rongxin Fang, Ren Lab Ludwig Cancer Research Bioinformatics Ph.D. Student University of California, San Diego

On Sep 13, 2019, at 9:52 AM, hjack123 notifications@github.com wrote:

tried googling but couldnt find Scrumblet, would you mind sharing the link? thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/r3fang/SnapATAC/issues/93?email_source=notifications&email_token=ABT6GG4PYN52KS2GCDXGQ2TQJPAMZA5CNFSM4IVNUSA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6VS3WA#issuecomment-531312088, or mute the thread https://github.com/notifications/unsubscribe-auth/ABT6GG27WQUDJSSG7JZYCKLQJPAMZANCNFSM4IVNUSAQ.

hjack123 commented 5 years ago

Thank u so much, out of curiosity, would i be able to do the filtering barcode with the QC described here (https://satijalab.org/signac/articles/pbmc_vignette.html) and continue ur pipeline?

r3fang commented 5 years ago

Yes, if you have qc file from 10X cell ranger, you can filter cells based on their QC report

On Sep 13, 2019, at 10:20 AM, hjack123 notifications@github.com wrote:

Thank u so much, out of curiosity, would i be able to do the filtering barcode with the QC described here (https://satijalab.org/signac/articles/pbmc_vignette.html https://satijalab.org/signac/articles/pbmc_vignette.html) and continue ur pipeline?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/r3fang/SnapATAC/issues/93?email_source=notifications&email_token=ABT6GG32QADRDZFNTHCNW6LQJPDVFA5CNFSM4IVNUSA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6VVDJI#issuecomment-531321253, or mute the thread https://github.com/notifications/unsubscribe-auth/ABT6GG4WUIWSRUTYDVF365TQJPDVFANCNFSM4IVNUSAQ.

hjack123 commented 5 years ago

Thank you I have been stuck here for a while, trying to combine 4 snap files

x.sp = snapRbind(x.landmark.sp, x.query.sp);

is there a way to check? buy looking at the context of x.landmark.sp and x.query.sp, they look the same to me. something related to the note Note: To merge snap objects, all the matrix (bmat, gmat, pmat) and metaData must be of the same number of columns between snap objects.

r3fang commented 5 years ago

Can you let me know the error message?

Sent from my iPhone

On Sep 13, 2019, at 11:30 AM, hjack123 notifications@github.com wrote:

Thank you I have been stuck here for a while, trying to combine 4 snap files

x.sp = snapRbind(x.landmark.sp, x.query.sp);

is there a way to check? buy looking at the context of x.landmark.sp and x.query.sp, they look the same to me. something related to the note Note: To merge snap objects, all the matrix (bmat, gmat, pmat) and metaData must be of the same number of columns between snap objects.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

hjack123 commented 5 years ago

x.sp = snapRbind(x.landmark.sp, x.query.sp); Error in rbind(deparse.level, ...) : numbers of columns of arguments do not match

hjack123 commented 5 years ago

The problem is solved. btw, there might be a typo here x.after.sp = runHarmony( obj=x.sp, eigs.dims=1:22, meta_data=x.sp@sample # sample index );

eigs.dim

hjack123 commented 5 years ago

if using umap creates an outlier which shows on the plot. is there a way to change xlim and ylim so the plot don't include the outlier?

JBreunig commented 4 years ago

Thank you I have been stuck here for a while, trying to combine 4 snap files

x.sp = snapRbind(x.landmark.sp, x.query.sp);

is there a way to check? buy looking at the context of x.landmark.sp and x.query.sp, they look the same to me. something related to the note Note: To merge snap objects, all the matrix (bmat, gmat, pmat) and metaData must be of the same number of columns between snap objects.

hjack123...does this Note refer to your solution to the problem? I'm having the same issue at this step. I can merge 2 samples from a new dataset but adding a 3rd from and older dataset causes the error you saw.

JBreunig commented 4 years ago

Thank you I have been stuck here for a while, trying to combine 4 snap files

x.sp = snapRbind(x.landmark.sp, x.query.sp);

is there a way to check? buy looking at the context of x.landmark.sp and x.query.sp, they look the same to me. something related to the note Note: To merge snap objects, all the matrix (bmat, gmat, pmat) and metaData must be of the same number of columns between snap objects.

hjack123...does this Note refer to your solution to the problem? I'm having the same issue at this step. I can merge 2 samples from a new dataset but adding a 3rd from and older dataset causes the error you saw.

Solved...just for future users my issue was caused by there being an extra metaData column in the newer CellRanger outputs. I just made the new column in metaData NULL to match the old metadata type number (19).

barcodes = barcodes[2:nrow(barcodes),];
barcodes$peak_region_cutsites = NULL  ###key to old versus new samples in cell ranger
barcodes$logUMI = log10(barcodes$passed_filters + 1);
TheSallyGardens commented 4 years ago

if using umap creates an outlier which shows on the plot. is there a way to change xlim and ylim so the plot don't include the outlier? Hi!hjack123 Did you solve the problem?

hjack123 commented 4 years ago

I ended up removing those cells (by filtering on umap locations) and re-plotting. same visualization purpose as changing xylim. hope it helps