fl-yu / CUT-RUNTools-2.0

CUT&RUN and CUT&Tag data processing and analysis
MIT License
99 stars 56 forks source link

Can't run single-cell example #47

Closed plbaldoni closed 2 years ago

plbaldoni commented 2 years ago

Hi,

I am having issues to run the tool with the single cell example dataset.

[info] 200 PE fastq files were detected ...
[info] First stage trimming ...
Thu Jun  9 10:00:24 AEST 2022
[info] Second stage trimming ...
Thu Jun  9 10:00:51 AEST 2022
[info] Aligning FASTQ files ...
Thu Jun  9 10:00:55 AEST 2022
[info] Alignment finished ...
Thu Jun  9 10:06:44 AEST 2022
[info] Sorting BAMs... 
Thu Jun  9 10:06:44 AEST 2022
[info] Marking duplicates... 
Thu Jun  9 10:07:52 AEST 2022
[info] Filtering unmapped, low quality, unproper paired fragments... 
Thu Jun  9 10:15:11 AEST 2022
[info] Generating coverage .bed files used for single-cell genome track visualization ... 
Thu Jun  9 10:15:13 AEST 2022
[info] Aggregation analysis of individual cells... 
Thu Jun  9 10:28:24 AEST 2022
Thu Jun  9 10:28:24 2022 Processing the group [[ groups_aggregation ]] ...
Thu Jun  9 10:28:24 2022 Build the scbam_dir directory /home/baldoni.p/cutruntools2/scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells ...
Thu Jun  9 10:28:24 2022 Build the scPS_dir directory /home/baldoni.p/cutruntools2/scCUTnTag/sc_pseudoBulk/groups_aggregation/pseudo_bulk_data ...
Thu Jun  9 10:28:24 2022 200 Barcode bam files will be copied and merged ...
[info] single-cell track generating
/home/baldoni.p/cutruntools2/scCUTnTag/sc_pseudoBulk # printed after adding pwd to file src/BASHscript/qbed.sh to check what was going on
/home/baldoni.p/cutruntools2/scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells # printed after adding pwd to file src/BASHscript/qbed.sh to check what was going on
[info] 1 files will be processed into a single-cell genome track file
awk: fatal: cannot open file `*.bed' for reading (No such file or directory)

It looks like the command bed_file=(`echo *.bed`) in src/BASHscript/qbed.sh is returning '*.bed' (hence causing the awk error shown above) because there are no bed files in the directory /home/baldoni.p/cutruntools2/scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells, only bam files:

(base) [baldoni.p@med-n14 cutruntools2]$ ll scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/*.bed
ls: cannot access scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/*.bed: No such file or directory
(base) [baldoni.p@med-n14 cutruntools2]$ ll scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/*.bam | head
-rw-r--r-- 1 baldoni.p  1.9M Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204735.bam
-rw-r--r-- 1 baldoni.p 1008K Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204736.bam
-rw-r--r-- 1 baldoni.p  1.1M Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204737.bam
-rw-r--r-- 1 baldoni.p  945K Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204738.bam
-rw-r--r-- 1 baldoni.p  908K Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204739.bam
-rw-r--r-- 1 baldoni.p  832K Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204740.bam
-rw-r--r-- 1 baldoni.p  805K Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204741.bam
-rw-r--r-- 1 baldoni.p  735K Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204742.bam
-rw-r--r-- 1 baldoni.p  767K Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204743.bam
-rw-r--r-- 1 baldoni.p  669K Jun  9 10:28 scCUTnTag/sc_pseudoBulk/groups_aggregation/single_cells/SRX5204744.bam

All the bed files are located in another directory:

(base) [baldoni.p@med-n14 cutruntools2]$ find . -name "*.bed" | head
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204735.bed
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204736.bed
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204737.bed
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204738.bed
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204739.bed
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204740.bed
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204741.bed
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204742.bed
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204743.bed
./scCUTnTag/sc_aligned.aug10/dup.marked.clean/SRX5204744.bed

Could you please help?

fl-yu commented 2 years ago

Hi Thank you for the feedback. I think I have fixed the issue. Can you update the file src/fastq2peak.sh and run the pipeline again? Please let me know if this occurs again or if you encounter any other questions.

fl-yu commented 2 years ago

I will close this thread but please feel free to reopen it if you have questions.