Hi genomax,
How would you extract though only the 084b5b69-e819-426f-9ff3-fea4891af330 from a line such as
1123 084b5b69-e819-426f-9ff3-fea4891af330 runid=d20680f0495125cc465d6a96efb49b194cb0777b read=2290 ch=184 start_time=2018-03-27T11:36:09Z
?
Or even from
084b5b69-e819-426f-9ff3-fea4891af330 runid=d20680f0495125cc465d6a96efb49b194cb0777b read=2290 ch=184 start_time=2018-03-27T11:36:09Z
(I can remove rather easily just the first string which are the prefix-numbers)?
I think BBMap do this job, with
filterbyname.shscriptFrom this thread
Edit :
Also possible with seqtk subseq :
From here
Thanks @Bastien. But I have tried it before and it gives an error:
Any idea why this happens?
Maybe it is related to nanopore data, space in the headers... I never process these kind of data. If BBmap and seqtk cannot manage those data I cannot do much more sadly.
You have the best ones on the case, see below , I will not say better :)
There is always Biopython
Is this nanopore data? I wonder if the tools are having problems with the spaces in the names of fastq headers. You could certainly try
filterbyname.shor otherwise change the spaces to_temporarily and then use the tools mentioned by Bastien.This is indeed nanopore data. Could these spaces in the header of the nanopore data be the reason for the error I'm getting (see my reply to Bastien's suggestion)?
While I did not spend a lot of time it appears that neither
filterbyname.shorseqtk subseqwork as intended with nanopore fastq data. I have asked @Brian about BBMap.Also checking with @Wouter deCoster to see if his
nanofilttool can be easily modified to do this task.The
084b5b69-e819-426f-9ff3-fea4891af330portion should be a unique identifier. Therefore you don't need the other parts of your txt file/read names for filtering. I'd assume filterbyname.sh should work if you only use those unique parts.Thanks Wouter, I understand your tip. However, what would be a fast way to filter the file which contains all the reads of my interest (that is, the file which I'd liketo guide the filtering of the FASTQ file), and keep just the identifiers, i.e.
084b5b69-e819-426f-9ff3-fea4891af330?