poretools icon indicating copy to clipboard operation
poretools copied to clipboard

working with multiple folders from Metrichor

Open jarrodscott opened this issue 8 years ago • 11 comments

Probably not an issue but more of a question. Will poretools recursively work through the "batch" folders that are now spit out by Metrichor for 1D reads? The new Metrichor output puts called reads into separate folders of 4000 reads.

I tried poretools stats pass/batch_1487*/*fast5 but receive an "Argument list too long" error. Do all the reads need to be in a single folder for poretools to function?

Thanks! Jarrod

jarrodscott avatar Feb 23 '17 15:02 jarrodscott

One problem with that command is that it will retrieve all of the files and tries to pass it on the command line, which obviously does not work because there are tons. You might be able to get it working with poretools stats pass/batch_1487* (i.e. just the folder names), but even that will fail with a sufficient number of reads. As a short fix you could either move all the reads into one folder, or link them symbolically.

@nickloman maybe it would be reasonable to provide a recursive search for fast5 files

pfaucon avatar Mar 12 '17 04:03 pfaucon

The current version in github conducts a recursive search. If you build from the repo, the following command should work:

poretools stats pass/batch_1487*/

arq5x avatar Mar 12 '17 04:03 arq5x

Hmm. I don't think it is actually doing anything recursively...

$ poretools fastq  --group 001 workspace/pass/*/ > reads_001.fastq

WARNING:poretools:Cannot open file: workspace/pass/0/. Perhaps it is corrupt? Moving on.

WARNING:poretools:Cannot open file: workspace/pass/1/. Perhaps it is corrupt? Moving on.

WARNING:poretools:Cannot open file: workspace/pass/10/. Perhaps it is corrupt? Moving on.

...

Am I missing something? Ideally, I want to pull all the fastq files from the albacore/workspace directory, but as far as I can tell,

poretools fastq --group 001 workspace/*/*/*.fast5 > reads_001.fastq

is choking due to the '*' expansions on the command line.

donutbrew avatar Mar 15 '17 19:03 donutbrew

Just try

poretools fastq --group 001 workspace/pass

nickloman avatar Mar 15 '17 19:03 nickloman

Yes, that works much better :+1: Thanks!!

donutbrew avatar Mar 15 '17 20:03 donutbrew

I'm having this same problem with Albacore produced batch folders - when I give the path to the workspace directory containing the batch folders, I get this error: WARNING:poretools:Directory is empty!

When I use workspace/*/, I get the same error as above, WARNING:poretools:Cannot open file: workspace/0/. Perhaps it is corrupt? Moving on.

Thanks!

joshualoving avatar Apr 07 '17 17:04 joshualoving

@joshualoving as @arq5x mentioned you should pull in the latest version from the git repo (the recursive subfolder code was fixed here). Then you can just run poretools fasta workspace/ and it will parse all the subfolders inthere as well.

EvdH0 avatar Apr 10 '17 18:04 EvdH0

Before I asked my question, I cloned and built from the repository and still had the problem. Do I need to clone a particular commit/branch?

Thanks!

joshualoving avatar Apr 10 '17 18:04 joshualoving

Hi @joshualoving I don't know if you got it to work or not however I was having the same problem and I was able to get it to work. First I deleted the poretools folder and reinstalled from the repo using the following command

git clone --recursive https://github.com/arq5x/poretools

I don't know if recursive is needed or not I just didn't want to lose a package.

Hope you got your question answered! Sean

skbrimer avatar Oct 23 '17 15:10 skbrimer

poretools fasta barcode03.fastq > barcode03.fasta WARNING:poretools:Cannot open file: barcode03.fastq. Perhaps it is corrupt? Moving on. i m getting this error after running above command. Please help

RenukaAgarwal avatar Mar 09 '19 11:03 RenukaAgarwal

Poretools works on the fast5 file not the fastq file. You would want.to run poretools fasta barcode03/ > extract_fasta.fasta if you are working with the fastq files you could use seqtk

skbrimer avatar Mar 09 '19 14:03 skbrimer