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

Prototype sabre - demultiplexing addition to RNAsik #32

Open
serine opened this issue Aug 20, 2018 · 0 comments
Open

Prototype sabre - demultiplexing addition to RNAsik #32

serine opened this issue Aug 20, 2018 · 0 comments

Comments

@serine
Copy link
Collaborator

serine commented Aug 20, 2018

Hi world,

Putting this out there hoping that somebody can get involved and write this bit of code for me :) 👍 . This is great way to get involved with open-source, learn and practice not only code writing by PR (pull request) submission, code review and perhaps some git rebasing - so that this new feature comes as a single unit. Don't be afraid if you haven't done this below, just fork the repo and see if you can make this bit of code to work. I can help you with the rest.

Below I've tried to described as detailed as I could what's needs doing in a step by step manner.

  • new flag -demult used to indicate that demultiplexing need to take place before running alignement
  • fastq files are passed in through -fqDir
  • error out if more then two fastq files were found and -demult is give. There probably can be just one fastq files (haven't seen that yet)
  • barcodes need to be passed through samplesSheet. Have to be a bit smart about handling different cases i.e normal RNAseq vs demultiplex first runs, because in a normal RNAseq run the columns order and meaning is "old_prefix" "new_prefix", whereas for demultiplexing run it should be "sample_name", "barcode".
  • if -demult flaged make new directory under fastqDir i.e fastqDir/demultiplexed similar to
sikFqFiles.bds:18:    string fqDir = sikDir+"/"+"fastqDir/"
sikTrim.bds:13:    string trimedDir = sikDir+"/"+"fastqDir/trimed"
  • write a function getDemultFqFiles in a separate sikDemultiplex.bds file. This function runs sabre and returns a list of demutltiplexed fastq files. This is how I think it should be pluged into main running script.
diff --git a/src/RNAsik.bds b/src/RNAsik.bds
index 83beaaf..65924c8 100644
--- a/src/RNAsik.bds
+++ b/src/RNAsik.bds
@@ -62,7 +62,14 @@ string{} usrOpts = getUsrOpts(extraOpts)
 
 string[] fqFiles
 if(!fqDir.isEmpty()) {
-    fqFiles = getFqFiles(cmdExe, fqDir, extn, sikDir)
+
+    if(demult) {
+        fqFile = getDemultFqFiles(....)
+    }
+    else {
+        fqFiles = getFqFiles(cmdExe, fqDir, extn, sikDir)
+    }
+
     mkLog("fqFiles", parseList(fqFiles), "samples", logsDir)
 
     if(trim) {

in fact for cleaner code perhaps move if(trim) into if else(trim) block. As in try demultiplexing, then try trimming, then simply get fastq files from fqDir path

Also need to think about some test cases

cheers

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

No branches or pull requests

1 participant