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

Add --recursive option to fastq_dir_to_samplesheet.py script #900

Closed
cutleraging opened this issue Nov 20, 2022 · 2 comments
Closed

Add --recursive option to fastq_dir_to_samplesheet.py script #900

cutleraging opened this issue Nov 20, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@cutleraging
Copy link

Description of the bug

Hello, thanks for your great work with this pipeline. I was trying to use the fastq_dir_to_samplesheet.py script to create the sampleSheet for me but it doesn't seem like it can a directory structure in which each folder contains the paired-end reads fora sample.

What my directory looks like

$ tree
.
├── S1
│   ├── MD5.txt
│   ├── S1_CKDL220024550-1A_HF35HDSX5_L1_1.fq.gz
│   └── S1_CKDL220024550-1A_HF35HDSX5_L1_2.fq.gz
├── S2
│   ├── MD5.txt
│   ├── S2_CKDL220024551-1A_HF35HDSX5_L1_1.fq.gz
│   └── S2_CKDL220024551-1A_HF35HDSX5_L1_2.fq.gz
├── S3
│   ├── MD5.txt
│   ├── S3_CKDL220024552-1A_HF35HDSX5_L1_1.fq.gz
│   └── S3_CKDL220024552-1A_HF35HDSX5_L1_2.fq.gz
├── S4
│   ├── MD5.txt
│   ├── S4_CKDL220024553-1A_HF35HDSX5_L1_1.fq.gz
│   └── S4_CKDL220024553-1A_HF35HDSX5_L1_2.fq.gz
├── S5
│   ├── MD5.txt
│   ├── S5_CKDL220024554-1A_HF35HDSX5_L1_1.fq.gz
│   └── S5_CKDL220024554-1A_HF35HDSX5_L1_2.fq.gz
└── S6
    ├── MD5.txt
    ├── S6_CKDL220024555-1A_HF35HDSX5_L1_1.fq.gz
    └── S6_CKDL220024555-1A_HF35HDSX5_L1_2.fq.gz

How I am running the script. I provide the top directory in which all the sub directories are contained

$ ./fastq_dir_to_samplesheet.py /01.RawData samplesheet.csv --strandedness reverse

WARNING: No FastQ files found so samplesheet has not been created!

Please check the values provided for the:
  - Path to the directory containing the FastQ files
  - '--read1_extension' parameter
  - '--read2_extension' parameter

I also saw on line 100 that recursive is set to False, but I tried changing it to true and still got nothing
return sorted(glob.glob(os.path.join(fastq_dir, f"*{extension}"), recursive=True))

Any help with this? Thanks!

Command used and terminal output

No response

Relevant files

No response

System information

No response

@cutleraging cutleraging added the bug Something isn't working label Nov 20, 2022
@cutleraging
Copy link
Author

Update: I seemed to have made it recursive by changing line 100 to this
return sorted(glob.glob(os.path.join(fastq_dir, f"**/*{extension}"), recursive=True))
Cheers

@drpatelh drpatelh added this to the 3.10 milestone Dec 12, 2022
@drpatelh drpatelh changed the title fastq_dir_to_samplesheet.py recursive Add --recursive option to fastq_dir_to_samplesheet.py script Dec 17, 2022
drpatelh added a commit to drpatelh/nf-core-rnaseq that referenced this issue Dec 18, 2022
@drpatelh
Copy link
Member

Fixed in #908

Added boolean --recursive option to the script that is off by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants