Skip to content

test_subset.sh - miRNA analysis - urllib.error.HTTPError: HTTP Error 404: Not Found #48

@kubu4

Description

@kubu4

It seems like the URL for downloading miRBase is different than what is utilized in the code. Current URL is:

https://www.mirbase.org/download/CURRENT/

However, XICRA/modules/database.py has this:

    ## miRBase ftp site
    ftp_site = "https://www.mirbase.org/ftp/CURRENT/"

As such, when running test_subset.sh, the following error gets thrown during miRNA analysis:

|==================================================|
|                  miRNA analysis                  |
|==================================================|


--------- Starting Process ---------
	03/29/2024, 09:30:06

+ Software for miRNA analysis selected:
['miraligner']
+ Getting files from input folder... 
+ Mode: join.
+ Extension: 
[_joined.fastq]

+ Input folder exists
	5 files selected...
	5 samples selected...
	Single end mode selected...
+ Species provided: hsa
+ Create folder to store results:  /home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/site-packages/XICRA/modules/db_files
+ File miRNA gff3 annotation
	** Download it form miRBase
Traceback (most recent call last):
  File "/home/sam/programs/mambaforge/envs/XICRA_env/bin/XICRA", line 398, in <module>
    args.func(args)
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/site-packages/XICRA/modules/miRNA.py", line 148, in run_miRNA
    options = database.miRNA_db(options)    
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/site-packages/XICRA/modules/database.py", line 101, in miRNA_db
    options.miRNA_gff = functions.main_functions.urllib_request(options.miRNA_db, ftp_site1, file_name, Debug)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/site-packages/HCGB/functions/main_functions.py", line 221, in urllib_request
    urllib.request.urlretrieve(url_string, file_path_name )
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/urllib/request.py", line 240, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
                            ^^^^^^^^^^^^^^^^^^
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/urllib/request.py", line 215, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/urllib/request.py", line 521, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/urllib/request.py", line 630, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/urllib/request.py", line 559, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/home/sam/programs/mambaforge/envs/XICRA_env/lib/python3.12/urllib/request.py", line 639, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found


Fri Mar 29 09:30:06 PDT 2024 ... Paired End Test finished ...

# ------------------------------ #

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions