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

Input csv bug fixes regarding sample id #173

Closed
wants to merge 7 commits into from
Closed

Conversation

TomasCumlin
Copy link

@TomasCumlin TomasCumlin commented Sep 5, 2023

Description

Summary of the changes made:

  • get_meta.nf modifed
  • Exit workflow if ID duplicates, non-ASCII characters, incorrect length of ID or incorrect platform added
  • 8 additional files with local changes that are not to be merged with the master repository.

Primary function of PR

  • Hotfix
  • Minor functionality improvement
  • Major functionality improvement / New type of analysis
  • Backward-breaking functionality

Testing

Either describe a procedure, or add data; that confirms that the PR resolves what it sets out to do

Sign-offs

Copy link
Member

@sylvinite sylvinite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice method module updates! Very pro!

Some comments about things that accidently slipped in.

Also, to be sure, the reference updates you do for the submodules are more recent versions, correct?


include { CALL_STAPHYLOCOCCUS_AUREUS } from './workflows/staphylococcus_aureus.nf'
include { CALL_MYCOBACTERIUM_TUBERCULOSIS } from './workflows/mycobacterium_tuberculosis.nf'

<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contains bad merge

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this happens when you merge and have conflicts that you need to resolve. These lines should be deleted.

@@ -1,22 +1,22 @@
params {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let the example config remain as is. Make a seperate config for your local system, or add it to .gitignore

@@ -1,2 +1,3 @@
id,platform,read1,read2
p1000,illumina,/path/to/JASEN/assets/test_data/sequencing_data/saureus_100k/saureus_large_R1_001.fastq.gz,/path/to/JASEN/assets/test_data/sequencing_data/saureus_100k/saureus_large_R2_001.fastq.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let the example config remain as is. Make a seperate config for your local system, or add it to .gitignore

@ryanjameskennedy ryanjameskennedy changed the title Issue 59 & 60 Input csv bug fixes regarding sample id Sep 5, 2023


// Function for platform and paired-end or single-end
def get_meta(LinkedHashMap row) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been moved to methods/get_meta.nf. Remove/copy changes there:)

workflow {
if (workflow.profile == "staphylococcus_aureus") {
CALL_STAPHYLOCOCCUS_AUREUS()
} else if (workflow.profile == "mycobacterium_tuberculosis") {
CALL_MYCOBACTERIUM_TUBERCULOSIS()
}
>>>>>>> master
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line (related to conflicts from merge)

emit:
pipeline_result = create_analysis_result.output
cdm_import = export_to_cdm.output
=======
Copy link
Collaborator

@ryanjameskennedy ryanjameskennedy Sep 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything above and including this line should be removed as it is in the workflows.

@@ -1,14 +1,45 @@
idList = [] // Global variable to save IDs from samplesheet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you not create a list within the get_meta.nf method instead?

@@ -1,14 +1,179 @@
#!/usr/bin/env nextflow

nextflow.enable.dsl=2
idList = [] // Global variable to save IDs from samplesheet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed

@@ -59,14 +59,22 @@ process chewbbaca_create_batch_list {
script:
output = "batch_input.list"
"""
realpath $maskedAssembly > $output
touch /projects/mikro/nobackup/gms/jasen2/chewbbaca_temp.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the changes in this file need to be reverted back to the original

platforms = ["illumina", "nanopore", "pacbio", "iontorrent"]

// Error messages
idErrorMessage = "\nERROR: Please check input samplesheet -> ID '${row.id}' is not a unique name in the samplesheet."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good effort but I reckon that we should maybe consider making a new method called check_input.nf because this check plays no role in the act of getting the metadata. Revert this method to it's original format and create a method file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why these databases have two changes from the merge. Could it be the newline formatting on different platforms? @sylvinite @LordRust

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doublechecked and its cus the database "updated to" is actually 3 months older.
So the commits to change the submodule commitid target need to be removed.

Copy link
Collaborator

@ryanjameskennedy ryanjameskennedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I would revert all 9 of these files back to their original form and just create a new method (check_input.nf). Some advice that will save you some pain:

  • Don't use git add . -> Rather use git add <filepath> to be more specific with what you wish to push.
  • Use git status to see which files are staged to be commited before you git commit anything.

I'm happy to see you giving this a go! You will pick everything up super quickly! Keep up the good work!

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

Successfully merging this pull request may close these issues.

None yet

3 participants