caleblareau / mgatk

mgatk: mitochondrial genome analysis toolkit
http://caleblareau.github.io/mgatk
MIT License
98 stars 25 forks source link

Process 10x-scRNA-seq data using mgatk #44

Closed pxh251 closed 2 years ago

pxh251 commented 2 years ago

Hi, Greetings! When I tried to submit my 10x-scRNA-seq data file for analysis using the code below (with my bam file and barcodes.tsv, not shown here):

mgatk tenx -i ${outdir}/outs/possorted_bam.bam \ -n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB \ -bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv

But when there's an error showed up after I submitted this analysis: " User specified mitochondrial genome does NOT match .bam file; correctly specify reference genome or .fasta file"

Since this .bam file is not generated by us, is there any other common reference genome that I can use to try? Thank you very much!

My mgatk version is v0.6.4 My PC is macOS Catalina V 10.15.7

caleblareau commented 2 years ago

fair warning the 10x scRNA-seq generally doesn't work well :)

but the gist is that you should check your mitochondrial chromosome in your bam file and if it's not chrM (i.e. it's probably MT), just update with the -g flag to say GRCh38

VirulentKid commented 2 years ago

good job

pxh251 commented 2 years ago

fair warning the 10x scRNA-seq generally doesn't work well :)

but the gist is that you should check your mitochondrial chromosome in your bam file and if it's not chrM (i.e. it's probably MT), just update with the -g flag to say GRCh38

Hi, Thank you very much for your reply. Yes I opened the bam file and the Chromosome number is not labelled chr1, chr2, ...; instead it is just labelled 1, 2, ... Sorry and I am a little confused about what do you mean by updating with the -g flag to say GRCh38? Is there any specific commandline that I can put in to run? Sorry I am a bit new to this mgatk.

pxh251 commented 2 years ago

fair warning the 10x scRNA-seq generally doesn't work well :)

but the gist is that you should check your mitochondrial chromosome in your bam file and if it's not chrM (i.e. it's probably MT), just update with the -g flag to say GRCh38

Hi, I tired your method to add -g glad following with the GRCh38 and it fixed the problem! Thank you very much. But during the process, it showed another error saying Error in checkGrep(grep ".A.txt, files)) : Improper folder specifications; file missing / extra file present. See documentation Calls: importMito -> checkGrep Execution halted Do you have any ideas about this issue? Thank you very much!

caleblareau commented 2 years ago

Can you cat the log files, including the snakemake log?

pxh251 commented 2 years ago

Can you cat the log files, including the snakemake log?

Thanks for your reply. May I ask where can I find those log files?

pxh251 commented 2 years ago

Now in my final output, there's only one file called chrM_refAllele.txt

caleblareau commented 2 years ago

in the output folder, there should be a logs folder in addition to a final folder

pxh251 commented 2 years ago

in the output folder, there should be a logs folder in addition to a final folder

There are only three folders: fast, final, and temp

caleblareau commented 2 years ago

Can you rerun it with the -z flag

On Nov 3, 2021, at 10:27 AM, pxh251 @.***> wrote:



in the output folder, there should be a logs folder in addition to a final folder

There are only three folders: fast, final, and temp

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/caleblareau/mgatk/issues/44#issuecomment-959758208, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD32FYPXG63M6N4UYZF7JCLUKF5JHANCNFSM5HHAQTCA. 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.

pxh251 commented 2 years ago

Can you rerun it with the -z flag On Nov 3, 2021, at 10:27 AM, pxh251 @.***> wrote:  in the output folder, there should be a logs folder in addition to a final folder There are only three folders: fast, final, and temp — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#44 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD32FYPXG63M6N4UYZF7JCLUKF5JHANCNFSM5HHAQTCA. 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.

Are you saying re-run this whole thing with the -z flag? Where should I put it?

_mgatk tenx -i ${outdir}/outs/possorted_bam.bam -n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB -bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv_

Thanks!

caleblareau commented 2 years ago

yes exactly... anywhere in the call is fine; e.g. here:

mgatk tenx -i ${outdir}/outs/possorted_bam.bam
-n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB -z 
-bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv`
pxh251 commented 2 years ago

yes exactly... anywhere in the call is fine; e.g. here:

mgatk tenx -i ${outdir}/outs/possorted_bam.bam
-n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB -z 
-bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv`

Hi, I just re-ran it. And under the "logs" folder there are five files/folders: "base.mgatk.log", "CRR_test1.parameters.txt", "CRR_test1.snakemake_tenx.log", "filterless" and "rmdupslogs".

pxh251 commented 2 years ago

yes exactly... anywhere in the call is fine; e.g. here:

mgatk tenx -i ${outdir}/outs/possorted_bam.bam
-n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB -z 
-bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv`

I cat the snakelike_tenx.log file an this is the screenshot of the error Screen Shot 2021-11-03 at 5 20 10 PM

Could you please let me know whether you could see the picture attached? Thanks

caleblareau commented 2 years ago

Can you upload the whole files— this doesn’t have anything that I can tell what went wrong

On Nov 3, 2021, at 2:21 PM, pxh251 @.**@.>> wrote:

yes exactly... anywhere in the call is fine; e.g. here:

mgatk tenx -i ${outdir}/outs/possorted_bam.bam -n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB -z -bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv`

I cat the snakelike_tenx.log file an this is the screenshot of the error [Screen Shot 2021-11-03 at 5 20 10 PM]https://user-images.githubusercontent.com/93609961/140194582-a2519296-88d7-4d60-945b-9b0b5e3aafc1.png

Could you please let me know whether you could see the picture attached? Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/caleblareau/mgatk/issues/44#issuecomment-960097898, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD32FYMCWFW27KV7VQAFOEDUKGYYLANCNFSM5HHAQTCA. 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.

pxh251 commented 2 years ago

Can you upload the whole files— this doesn’t have anything that I can tell what went wrong On Nov 3, 2021, at 2:21 PM, pxh251 @.**@.>> wrote: yes exactly... anywhere in the call is fine; e.g. here: mgatk tenx -i ${outdir}/outs/possorted_bam.bam -n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB -z -bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv` I cat the snakelike_tenx.log file an this is the screenshot of the error [Screen Shot 2021-11-03 at 5 20 10 PM]https://user-images.githubusercontent.com/93609961/140194582-a2519296-88d7-4d60-945b-9b0b5e3aafc1.png Could you please let me know whether you could see the picture attached? Thanks — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#44 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD32FYMCWFW27KV7VQAFOEDUKGYYLANCNFSM5HHAQTCA. 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.

Thanks for your reply. While file do you need? Is that the snakelike_tenx.log file?

pxh251 commented 2 years ago

Can you upload the whole files— this doesn’t have anything that I can tell what went wrong On Nov 3, 2021, at 2:21 PM, pxh251 @.**@.**>> wrote: yes exactly... anywhere in the call is fine; e.g. here: mgatk tenx -i ${outdir}/outs/possorted_bam.bam -n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB -z -bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv` I cat the snakelike_tenx.log file an this is the screenshot of the error [Screen Shot 2021-11-03 at 5 20 10 PM]https://user-images.githubusercontent.com/93609961/140194582-a2519296-88d7-4d60-945b-9b0b5e3aafc1.png Could you please let me know whether you could see the picture attached? Thanks — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#44 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD32FYMCWFW27KV7VQAFOEDUKGYYLANCNFSM5HHAQTCA. 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.

Thanks for your reply. While file do you need? Is that the snakelike_tenx.log file?

Hi, Thanks for your time and patience. I already downloaded the snakelike_tenx file, do you mind if I send that to you via email? Thanks!

pxh251 commented 2 years ago

Can you upload the whole files— this doesn’t have anything that I can tell what went wrong On Nov 3, 2021, at 2:21 PM, pxh251 @.**@.**>> wrote: yes exactly... anywhere in the call is fine; e.g. here: mgatk tenx -i ${outdir}/outs/possorted_bam.bam -n CRR_test1 -o CRR_test1_mgatk -c 12 -ub UB -z -bt CB -b ${outdir}/outs/filtered_feature_bc_matrix/barcodes.tsv` I cat the snakelike_tenx.log file an this is the screenshot of the error [Screen Shot 2021-11-03 at 5 20 10 PM]https://user-images.githubusercontent.com/93609961/140194582-a2519296-88d7-4d60-945b-9b0b5e3aafc1.png Could you please let me know whether you could see the picture attached? Thanks — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#44 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD32FYMCWFW27KV7VQAFOEDUKGYYLANCNFSM5HHAQTCA. 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.

Thanks for your reply. While file do you need? Is that the snakelike_tenx.log file?

Hi, Thanks for your time and patience. I already downloaded the snakelike_tenx file, do you mind if I send that to you via email? Thanks!

Hi, please see the whole file attached. Thank you very much CRR_test1.snakemake_tenx.log !

caleblareau commented 2 years ago

Based on the log output, you are missing the .qc.bam file, which may be an upstream issue, potentially with Java. Can you send the output of ls -lRh from the output directory?