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

looper isn't working with sample_table_index #458

Closed
nsheff opened this issue Feb 15, 2024 · 6 comments
Closed

looper isn't working with sample_table_index #458

nsheff opened this issue Feb 15, 2024 · 6 comments

Comments

@nsheff
Copy link
Contributor

nsheff commented Feb 15, 2024

Using a basic project with a sample table index fails, due to this line:

name=sample.sample_name,

it's expecting there to be a sample_name column, which there is not, since I'm using sample_table_index.

This makes looper not fully compliant with PEP.

@donaldcampbelljr
Copy link
Contributor

I believe this is a Peppy issue: pepkit/peppy#459

@nsheff
Copy link
Contributor Author

nsheff commented Feb 15, 2024

I don't think it's a peppy issue -- it's looper code that is referring to sample.sample_name

are you suggesting that peppy make available a .sample_name attribute to refer to wherever the index is?

@nsheff nsheff added this to the v1.8.0 milestone Feb 16, 2024
@donaldcampbelljr
Copy link
Contributor

I don't think it's a peppy issue -- it's looper code that is referring to sample.sample_name

are you suggesting that peppy make available a .sample_name attribute to refer to wherever the index is?

Yes. I thought that was the original functionality.

Some digging, for reference to this issue:
pepkit/peppy@3d5495b

@donaldcampbelljr
Copy link
Contributor

I added a commit here where I made a test to help troubleshoot this issue further: 8fde43a

Using a sample_table_index in the project config, I also replaced sample.sample_name in the Looper code with sample[self.prj.sample_table_index]. This was done based on previous, similar work that may not have been completed: 9ce510d

However, I now see an Eido validation error during the test where I simply attempt to use looper run

Error: EidoValidationError (Validation failed): {"'sample_name' is a required property": [{'type': "'sample_name' is a required property", 'message': "'sample_name' is a required property on instance project", 'sample_name': 'project'}]}
["'sample_name' is a required property"]

Related test data:

project config:

name: looper_advanced_test
pep_version: 2.0.0
sample_table: annotation_sheet.csv
sample_modifiers:
  append:
    attr: val
  derive:
    attributes:
    - read1
    - read2
    sources:
      SRA_1: '{SRR}_1.fastq.gz'
      SRA_2: '{SRR}_2.fastq.gz'
sample_table_index: NOT_SAMPLE_NAME

annotation sheet

NOT_SAMPLE_NAME protocol data_source SRR Sample_geo_accession read1 read2
sample1 PROTO1 SRA SRR5210416 GSM2471255 SRA_1 SRA_2
sample2 PROTO1 SRA SRR5210450 GSM2471300 SRA_1 SRA_2
sample3 PROTO2 SRA SRR5210398 GSM2471249 SRA_1 SRA_2

@donaldcampbelljr
Copy link
Contributor

Future discussion to happen in: pepkit/peppy#459

However, will keep this open to track for Looper.

@donaldcampbelljr donaldcampbelljr modified the milestones: v1.8.0, v1.9.0 Mar 21, 2024
@donaldcampbelljr
Copy link
Contributor

donaldcampbelljr commented May 20, 2024

Ok, I believe this PR in Peppy (pepkit/peppy#484) will solve this issue and the corresponding issue: pepkit/peppy#459

  • We will need to do a release of Peppy (or a pre-release) and pin that in Looper reqs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants