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

Enhancement - specify trim sequences in file? #43

Closed
marcelm opened this issue Mar 13, 2015 · 2 comments
Closed

Enhancement - specify trim sequences in file? #43

marcelm opened this issue Mar 13, 2015 · 2 comments

Comments

@marcelm
Copy link
Owner

marcelm commented Mar 13, 2015

From kga1...@gmail.com on November 12, 2011 20:20:02

Would it be possible to specify sequences to be trimmed in a file, rather than directly on the command line? Right now I do this:

$cutadapt -m 20 -a AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACATCACGATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACCGATGTATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACTTAGGCATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACTGACCAATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACACAGTGATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACGCCAATATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACCAGATCATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACACTTGAATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACGATCAGATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACTAGCTTATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACGGCTACATCTCGTATGCCGTCTTCTGCTTG -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACCTTGTAATCTCGTATGCCGTCTTCTGCTTG -a CTTCACCGTGCCAGACTAGAGTCAAGCTCAACAGGGTCTTCTTTCCCCGCTG -a GGATGAACGAGATTCCCACTGTCCCTACCTACTATCCAGCGAAACCACAGCC -a CTCCCTTTCGATCGGCCGAGGGCAACGGAGGCCATCGCCCGTCCCTTCGGAA -a CGAGATTCCCACTGTCCCTACCTACTATCCAGCGAAACCACAGCCAAGGGAA -a CCACTCTCGACTGCCGGCGACGGCCGGGTATGGGCCCGACGCTCCAGCGCCA -a TGGAAGTCGGAATCCGCTAAGGAGTGTGTAACAACTCACCTGCCGAATCAAC -a CCTATACCCAGGTCGGACGACCGATTTGCACGTCAGGACCGCTACGGACCTC -a CACGAGCGCACGTGTTAGGACCCGAAAGATGGTGAACTATGCCTGGGCAGGG -a GTCGGAATCCGCTAAGGAGTGTGTAACAACTCACCTGCCGAATCAACTAGCC -a CTCCCGTCCACTCTCGACTGCCGGCGACGGCCGGGTATGGGCCCGACGCTCC -a CGCAGGTTCAGACATTTGGTGTATGTGCTTGGCTGAGGAGCCAATGGGGCGA -a GAACGAGATTCCCACTGTCCCTACCTACTATCCAGCGAAACCACAGCCAAGG -a CAGAAGGGCAAAAGCTCGCTTGATCTTGATTTTCAGTACGAATACAGACCGT -a TTTCGATCGGCCGAGGGCAACGGAGGCCATCGCCCGTCCCTTCGGAACGGCG input.fastq > output.fastq

I would be much easier if I could do:
$cutadapt -m 20 -a <trim_sequence_file> input.fastq > output.fastq

Original issue: http://code.google.com/p/cutadapt/issues/detail?id=33

@marcelm
Copy link
Owner Author

marcelm commented Mar 13, 2015

From marcel.m...@tu-dortmund.de on March 09, 2012 02:12:26

Sorry for the late reply. I have had little time to work on cutadapt. What you desire actually works by using a feature of the Bashs shell. Write a “configuration file” adapters.conf that contains the necessary command-line parameters, for example:

-a AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT
-a GATCGGAAGAGCACACGTCTGAACTCCAGTCACATCACGATCTCGTATGCCGTCTTCTGCTTG
and so on. The file can contain line breaks. They will be replaced by spaces.

Then run cutadapt as follows:
cutadapt -m 20 $(<adapters.conf) input.fastq > output.fastq

If you don’t use Bash, then writing $(cat adapters.conf) may work.

I know this is not quite what one wants as a proper configuration file would support comments and proper syntax checking. I hope it will do for now. Sorry again this has taken so long. I will leave this report open for now.

Status: Accepted
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

@marcelm
Copy link
Owner Author

marcelm commented Mar 13, 2015

From marcel.m...@tu-dortmund.de on August 05, 2014 04:36:24

This has now been implemented and is part of cutadapt 1.5.

Status: Fixed

@marcelm marcelm closed this as completed Mar 13, 2015
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