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

snp target_metrics FileNotFoundError(f'No file found for {pattern_list}') #262

Open
PhilippBanza opened this issue Sep 4, 2023 · 1 comment

Comments

@PhilippBanza
Copy link

Hi, I need help with the snp assay:

Describe the bug
During the snp run I receive an FileNotFoundError at step target_metrics:

2023-09-01 23:17:01,724 - celescope.tools.barcode.add_step_metrics - INFO - done. time used: 0:00:00.000327
2023-09-01 23:17:01,727 - celescope.tools.barcode.run - INFO - done. time used: 9:03:02.122252
2023-09-01 23:17:01,727 - celescope.tools.step._clean_up - INFO - start...
2023-09-01 23:17:01,744 - celescope.tools.step._render_html - INFO - start...
2023-09-01 23:17:02,506 - celescope.tools.step._render_html - INFO - done. time used: 0:00:00.761477
2023-09-01 23:17:02,506 - celescope.tools.step._clean_up - INFO - done. time used: 0:00:00.779391
2023-09-01 23:17:02,506 - celescope.tools.barcode.barcode - INFO - done. time used: 9:03:03.698185
2023-09-01 23:35:32,885 - celescope.tools.step._clean_up - INFO - start...
2023-09-01 23:35:32,907 - celescope.tools.step._render_html - INFO - start...
2023-09-01 23:35:33,505 - celescope.tools.step._render_html - INFO - done. time used: 0:00:00.597490
2023-09-01 23:35:33,505 - celescope.tools.step._clean_up - INFO - done. time used: 0:00:00.620049
2023-09-01 23:35:33,511 - celescope.tools.featureCounts.featureCounts - INFO - done. time used: 3:43:20.455596
2023-09-01 23:35:41,546 - celescope.tools.target_metrics.target_metrics - INFO - start...
CeleScope version: 1.17.0 Args: Namespace(subparser_assay='snp', gene_list=None, panel='lung_1', bam='.//KM1_RNA_test/05.featureCounts/KM1_RNA_test_aligned_posSorted_addTag.bam', match_dir='./result_celesco_RNA_test', thread='20', debug=False, func=<function target_metrics at 0x7fb70e3ab040>)
2023-09-01 23:35:41,597 - celescope.tools.utils.get_barcode_from_match_dir - INFO - start...
2023-09-01 23:35:41,597 - celescope.tools.utils.get_matrix_dir_from_match_dir - INFO - start...
Traceback (most recent call last):
File "/home/philipp_bs/miniconda3/envs/celescope/bin/celescope", line 8, in
sys.exit(main())
File "/home/philipp_bs/miniconda3/envs/celescope/lib/python3.9/site-packages/celescope/celescope.py", line 54, in main
args.func(args)
File "/home/philipp_bs/miniconda3/envs/celescope/lib/python3.9/site-packages/celescope/tools/utils.py", line 45, in wrapper
result = func(*args, **kwargs)
File "/home/philipp_bs/miniconda3/envs/celescope/lib/python3.9/site-packages/celescope/tools/target_metrics.py", line 163, in target_metrics
with Target_metrics(args, display_title='Target Enrichment') as runner:
File "/home/philipp_bs/miniconda3/envs/celescope/lib/python3.9/site-packages/celescope/tools/target_metrics.py", line 42, in init
self.match_barcode_list, self.n_cell = utils.get_barcode_from_match_dir(args.match_dir)
File "/home/philipp_bs/miniconda3/envs/celescope/lib/python3.9/site-packages/celescope/tools/utils.py", line 45, in wrapper
result = func(*args, **kwargs)
File "/home/philipp_bs/miniconda3/envs/celescope/lib/python3.9/site-packages/celescope/tools/utils.py", line 306, in get_barcode_from_match_dir
matrix_dir = get_matrix_dir_from_match_dir(match_dir)
File "/home/philipp_bs/miniconda3/envs/celescope/lib/python3.9/site-packages/celescope/tools/utils.py", line 45, in wrapper
result = func(*args, **kwargs)
File "/home/philipp_bs/miniconda3/envs/celescope/lib/python3.9/site-packages/celescope/tools/utils.py", line 292, in get_matrix_dir_from_match_dir
matrix_dir = glob_file(matrix_dir_pattern_list)
File "/home/philipp_bs/miniconda3/envs/celescope/lib/python3.9/site-packages/celescope/tools/utils.py", line 247, in glob_file
raise FileNotFoundError(f'No file found for {pattern_list}')
FileNotFoundError: No file found for ['./result_celescope_KM1_total/*count/*filtered_feature_bc_matrix', './result_celescope_KM1_total/*count/*matrix_10X']
2023-09-01 23:35:44,461 - celescope.snp.variant_calling.variant_calling - INFO - start...

Shell script:

celescope snp sample --outdir .//KM1_RNA_test/00.sample --sample KM1_RNA_test --thread 20 --chemistry auto  --fq1 ./lane_1/fast_dir/KM1_S138788_1_R1.fastq,./lane_2/fast_dir/KM1_S138788_2_R1.fastq,./lane_1/KM1_enriched_S138790_1_R1.fastq,./lane_2/KM1_enriched_S138790_2_R1.fastq 
celescope snp barcode --outdir .//KM1_RNA_test/01.barcode --sample KM1_RNA_test --thread 20 --chemistry auto --lowNum 2  --fq1 ./lane_1/fast_dir/KM1_S138788_1_R1.fastq,./lane_2/fast_dir/KM1_S138788_2_R1.fastq,./lane_1/KM1_enriched_S138790_1_R1.fastq,./lane_2/KM1_enriched_S138790_2_R1.fastq --fq2 ./lane_1/fast_dir/KM1_S138788_1_R2.fastq,./lane_2/fast_dir/KM1_S138788_2_R2.fastq,./lane_1/KM1_enriched_S138790_1_R2.fastq,./lane_2/KM1_enriched_S138790_2_R2.fastq 
celescope snp cutadapt --outdir .//KM1_RNA_test/02.cutadapt --sample KM1_RNA_test --thread 20 --minimum_length 20 --nextseq_trim 20 --overlap 10  --fq .//KM1_RNA_test/01.barcode/KM1_RNA_test_2.fq 
celescope snp consensus --outdir .//KM1_RNA_test/03.consensus --sample KM1_RNA_test --thread 20 --threshold 0.5 --not_consensus --min_consensus_read 1  --fq .//KM1_RNA_test/02.cutadapt/KM1_RNA_test_clean_2.fq 
celescope snp star --outdir .//KM1_RNA_test/04.star --sample KM1_RNA_test --thread 20 --genomeDir /home/philipp_bs/bioinf_isilon/Research/HUTTER/Internal/philipp_bioinf/singleron/hs_ensembl_110 --outFilterMatchNmin 50 --outFilterMultimapNmax 1 --starMem 30  --fq .//KM1_RNA_test/02.cutadapt/KM1_RNA_test_clean_2.fq 
celescope snp featureCounts --outdir .//KM1_RNA_test/05.featureCounts --sample KM1_RNA_test --thread 20 --gtf_type gene --genomeDir /home/philipp_bs/bioinf_isilon/Research/HUTTER/Internal/philipp_bioinf/singleron/hs_ensembl_110  --input .//KM1_RNA_test/04.star/KM1_RNA_test_Aligned.out.bam 
celescope snp target_metrics --outdir .//KM1_RNA_test/06.target_metrics --sample KM1_RNA_test --thread 20 --panel lung_1  --bam .//KM1_RNA_test/05.featureCounts/KM1_RNA_test_aligned_posSorted_addTag.bam --match_dir ./result_celescope_KM1_total --add_RG 
celescope snp variant_calling --outdir .//KM1_RNA_test/07.variant_calling --sample KM1_RNA_test --thread 20 --genomeDir /home/philipp_bs/bioinf_isilon/Research/HUTTER/Internal/philipp_bioinf/singleron/hs_ensembl_110 --panel lung_1  --bam .//KM1_RNA_test/06.target_metrics/KM1_RNA_test_filtered_sorted.bam --match_dir ./result_celescope_KM1_total 
celescope snp filter_snp --outdir .//KM1_RNA_test/08.filter_snp --sample KM1_RNA_test --thread 20 --ref_threshold_method otsu --alt_threshold_method otsu --ref_min_support_read 2 --alt_min_support_read 2  --vcf .//KM1_RNA_test/07.variant_calling/KM1_RNA_test_norm.vcf 
celescope snp analysis_snp --outdir .//KM1_RNA_test/09.analysis_snp --sample KM1_RNA_test --thread 20 --database GRCh38.mane.1.0.ensembl --panel lung_1 --plot_top_n 20  --match_dir ./result_celescope_KM1_total --vcf .//KM1_RNA_test/08.filter_snp/KM1_RNA_test_filtered.vcf 

Version
1.17.0

@zhouyiqi91
Copy link
Collaborator

It complained that the gene expression matrix directory was not found the in ./result_celescope_KM1_total/*count/

FileNotFoundError: No file found for ['./result_celescope_KM1_total/*count/*filtered_feature_bc_matrix', './result_celescope_KM1_total/*count/*matrix_10X']

Did the celescope rna pipeline complete successfully?

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

No branches or pull requests

2 participants