Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

'Multiple matching projects' error when explicitly stating project #3

Open
andyb3 opened this issue Jan 2, 2019 · 3 comments
Open

Comments

@andyb3
Copy link
Contributor

andyb3 commented Jan 2, 2019

Still get error for multiple matching projects when explicitly specifying project using -p flag.

In DNAnexus there are the following 3 projects:
003_181221_M02631_0140_000000000-C7LBK
003_181221_M02631_0140_000000000-C7LBK_partial
003_181221_M02631_0140_000000000-C7LBK_partial2

When running script with following command (with project specified using --project flag)

backup_runfolder.py -i /media/data1/share/181221_M02631_0140_000000000-C7LBK --logpath /home/mokaguys/Documents/automate_demultiplexing_logfiles/backup_runfolder_logfiles --project 003_181221_M02631_0140_000000000-C7LBK

Get:

2019-01-02 12:28:33,259 backup_runfolder.UAcaller 
ERROR - 3 matching DNAnexus projects were found for pattern: (003_181221_M02631_0140_000000000-C7LBK). Repeat script by giving explicit project to -p/--project flag```

@andyb3
Copy link
Contributor Author

andyb3 commented Mar 1, 2019

else:
# Else, search for the exact project name passed to the function
pattern = r'({})'.format(project)

Think this is because the regex doesn't define start and end of pattern, so anything containing the pattern still matches. i.e. change r'({})'.format(project) to r'^({})$'.format(project)

@andyb3
Copy link
Contributor Author

andyb3 commented Mar 1, 2019

actually on further inspection the above wouldn't work because the returned data from dx find projects is in format:

project-FGyzJQ00fZY17Z6XF9BGVqk8 : 003_180702_M02353_0228_000000000-G28HK_ONCO (ADMINISTER)

so would probably need to do something like r'project-.* : ({}) \([A-Z]+\)'.format(project)

@aledj2
Copy link
Contributor

aledj2 commented Apr 26, 2021

bump

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

No branches or pull requests

2 participants